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. |
| 81 | BleScanStateChanged ble_scan_state_changed = 2; |
Chenjie Yu | bd1a28f | 2018-07-17 14:55:19 -0700 | [diff] [blame] | 82 | ProcessStateChanged process_state_changed = 3; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 83 | BleScanResultReceived ble_scan_result_received = 4; |
| 84 | SensorStateChanged sensor_state_changed = 5; |
Bookatz | db026a2 | 2018-01-10 19:01:56 -0800 | [diff] [blame] | 85 | GpsScanStateChanged gps_scan_state_changed = 6; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 86 | SyncStateChanged sync_state_changed = 7; |
| 87 | ScheduledJobStateChanged scheduled_job_state_changed = 8; |
| 88 | ScreenBrightnessChanged screen_brightness_changed = 9; |
Bookatz | d674624 | 2017-10-24 18:39:35 -0700 | [diff] [blame] | 89 | WakelockStateChanged wakelock_state_changed = 10; |
Bookatz | ddccf0a | 2017-11-28 16:48:14 -0800 | [diff] [blame] | 90 | LongPartialWakelockStateChanged long_partial_wakelock_state_changed = 11; |
| 91 | MobileRadioPowerStateChanged mobile_radio_power_state_changed = 12; |
| 92 | WifiRadioPowerStateChanged wifi_radio_power_state_changed = 13; |
Chenjie Yu | bd1a28f | 2018-07-17 14:55:19 -0700 | [diff] [blame] | 93 | ActivityManagerSleepStateChanged activity_manager_sleep_state_changed = 14; |
| 94 | MemoryFactorStateChanged memory_factor_state_changed = 15; |
| 95 | ExcessiveCpuUsageReported excessive_cpu_usage_reported = 16; |
| 96 | CachedKillReported cached_kill_reported = 17; |
| 97 | ProcessMemoryStatReported process_memory_stat_reported = 18; |
Muhammad Qureshi | 9bced7d | 2020-01-16 15:22:12 -0800 | [diff] [blame] | 98 | LauncherUIChanged launcher_event = 19 [(module) = "sysui"]; |
Bookatz | ddccf0a | 2017-11-28 16:48:14 -0800 | [diff] [blame] | 99 | BatterySaverModeStateChanged battery_saver_mode_state_changed = 20; |
| 100 | DeviceIdleModeStateChanged device_idle_mode_state_changed = 21; |
| 101 | DeviceIdlingModeStateChanged device_idling_mode_state_changed = 22; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 102 | AudioStateChanged audio_state_changed = 23; |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 103 | MediaCodecStateChanged media_codec_state_changed = 24; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 104 | CameraStateChanged camera_state_changed = 25; |
| 105 | FlashlightStateChanged flashlight_state_changed = 26; |
| 106 | UidProcessStateChanged uid_process_state_changed = 27; |
| 107 | ProcessLifeCycleStateChanged process_life_cycle_state_changed = 28; |
| 108 | ScreenStateChanged screen_state_changed = 29; |
Bookatz | 8c6571b | 2017-10-24 15:04:41 -0700 | [diff] [blame] | 109 | BatteryLevelChanged battery_level_changed = 30; |
| 110 | ChargingStateChanged charging_state_changed = 31; |
| 111 | PluggedStateChanged plugged_state_changed = 32; |
Bookatz | a66083f | 2018-09-20 17:24:00 -0700 | [diff] [blame] | 112 | InteractiveStateChanged interactive_state_changed = 33; |
Siarhei Vishniakou | 3ddecff | 2018-11-08 19:57:13 -0800 | [diff] [blame] | 113 | TouchEventReported touch_event_reported = 34; |
Bookatz | 8c6571b | 2017-10-24 15:04:41 -0700 | [diff] [blame] | 114 | WakeupAlarmOccurred wakeup_alarm_occurred = 35; |
| 115 | KernelWakeupReported kernel_wakeup_reported = 36; |
Muhammad Qureshi | bcf6606 | 2019-12-23 17:55:48 -0800 | [diff] [blame] | 116 | WifiLockStateChanged wifi_lock_state_changed = 37 [(module) = "wifi"]; |
| 117 | WifiSignalStrengthChanged wifi_signal_strength_changed = 38 [(module) = "wifi"]; |
| 118 | WifiScanStateChanged wifi_scan_state_changed = 39 [(module) = "wifi"]; |
Bookatz | e588524 | 2017-10-24 20:10:31 -0700 | [diff] [blame] | 119 | PhoneSignalStrengthChanged phone_signal_strength_changed = 40; |
David Chen | c28b2bb | 2017-10-24 12:52:52 -0700 | [diff] [blame] | 120 | SettingChanged setting_changed = 41; |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 121 | ActivityForegroundStateChanged activity_foreground_state_changed = 42; |
David Chen | 2158296 | 2017-11-01 17:32:46 -0700 | [diff] [blame] | 122 | IsolatedUidChanged isolated_uid_changed = 43; |
Hugo Benichi | 884970e | 2017-11-14 22:42:46 +0900 | [diff] [blame] | 123 | PacketWakeupOccurred packet_wakeup_occurred = 44; |
Bookatz | 7948c87 | 2018-09-04 12:58:33 -0700 | [diff] [blame] | 124 | WallClockTimeShifted wall_clock_time_shifted = 45; |
Bookatz | 8fcd09a | 2017-12-18 13:01:10 -0800 | [diff] [blame] | 125 | AnomalyDetected anomaly_detected = 46; |
Andrei Onea | da01ea5 | 2019-01-30 15:28:36 +0000 | [diff] [blame] | 126 | AppBreadcrumbReported app_breadcrumb_reported = 47 [(allow_from_any_uid) = true]; |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 127 | AppStartOccurred app_start_occurred = 48; |
| 128 | AppStartCanceled app_start_canceled = 49; |
| 129 | AppStartFullyDrawn app_start_fully_drawn = 50; |
Muhammad Qureshi | 79f068c | 2019-12-20 06:55:57 -0800 | [diff] [blame] | 130 | LmkKillOccurred lmk_kill_occurred = 51 [(module) = "lmkd"]; |
Chenjie Yu | 52cacc6 | 2017-12-08 18:11:45 -0800 | [diff] [blame] | 131 | PictureInPictureStateChanged picture_in_picture_state_changed = 52; |
Muhammad Qureshi | bcf6606 | 2019-12-23 17:55:48 -0800 | [diff] [blame] | 132 | WifiMulticastLockStateChanged wifi_multicast_lock_state_changed = 53 [(module) = "wifi"]; |
Muhammad Qureshi | 79f068c | 2019-12-20 06:55:57 -0800 | [diff] [blame] | 133 | LmkStateChanged lmk_state_changed = 54 [(module) = "lmkd"]; |
Rajeev Kumar | 8a9fa05 | 2018-01-25 19:03:09 -0800 | [diff] [blame] | 134 | AppStartMemoryStateCaptured app_start_memory_state_captured = 55; |
Tej Singh | 1ea4289 | 2018-01-19 09:27:00 -0800 | [diff] [blame] | 135 | ShutdownSequenceReported shutdown_sequence_reported = 56; |
Tej Singh | 6483ea4 | 2018-01-25 17:45:49 -0800 | [diff] [blame] | 136 | BootSequenceReported boot_sequence_reported = 57; |
Andrei Onea | da01ea5 | 2019-01-30 15:28:36 +0000 | [diff] [blame] | 137 | DaveyOccurred davey_occurred = 58 [(allow_from_any_uid) = true]; |
Chenjie Yu | e890419 | 2017-12-08 19:12:57 -0800 | [diff] [blame] | 138 | OverlayStateChanged overlay_state_changed = 59; |
Chenjie Yu | ccfe645 | 2018-01-30 11:33:21 -0800 | [diff] [blame] | 139 | ForegroundServiceStateChanged foreground_service_state_changed = 60; |
Tej Singh | c477d9c | 2018-02-05 18:31:39 -0800 | [diff] [blame] | 140 | CallStateChanged call_state_changed = 61; |
Muhammad Qureshi | 9bced7d | 2020-01-16 15:22:12 -0800 | [diff] [blame] | 141 | KeyguardStateChanged keyguard_state_changed = 62 [(module) = "sysui"]; |
| 142 | KeyguardBouncerStateChanged keyguard_bouncer_state_changed = 63 [(module) = "sysui"]; |
| 143 | KeyguardBouncerPasswordEntered keyguard_bouncer_password_entered = 64 [(module) = "sysui"]; |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 144 | AppDied app_died = 65; |
Tej Singh | a883b37 | 2018-02-15 11:30:01 -0800 | [diff] [blame] | 145 | ResourceConfigurationChanged resource_configuration_changed = 66; |
Tej Singh | 5d991e1 | 2018-03-09 19:48:11 -0800 | [diff] [blame] | 146 | BluetoothEnabledStateChanged bluetooth_enabled_state_changed = 67; |
| 147 | BluetoothConnectionStateChanged bluetooth_connection_state_changed = 68; |
Bookatz | 48d362e | 2018-11-06 15:49:08 -0800 | [diff] [blame] | 148 | GpsSignalQualityChanged gps_signal_quality_changed = 69; |
Andrew Chant | b56388b | 2018-03-22 21:07:33 -0700 | [diff] [blame] | 149 | UsbConnectorStateChanged usb_connector_state_changed = 70; |
Andrew Chant | 28d627e | 2018-02-22 15:17:05 -0800 | [diff] [blame] | 150 | SpeakerImpedanceReported speaker_impedance_reported = 71; |
| 151 | HardwareFailed hardware_failed = 72; |
| 152 | PhysicalDropDetected physical_drop_detected = 73; |
| 153 | ChargeCyclesReported charge_cycles_reported = 74; |
Tej Singh | eee317b | 2018-03-07 19:28:05 -0800 | [diff] [blame] | 154 | MobileConnectionStateChanged mobile_connection_state_changed = 75; |
| 155 | MobileRadioTechnologyChanged mobile_radio_technology_changed = 76; |
Andrew Chant | b56388b | 2018-03-22 21:07:33 -0700 | [diff] [blame] | 156 | UsbDeviceAttached usb_device_attached = 77; |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 157 | AppCrashOccurred app_crash_occurred = 78; |
| 158 | ANROccurred anr_occurred = 79; |
| 159 | WTFOccurred wtf_occurred = 80; |
| 160 | LowMemReported low_mem_reported = 81; |
Howard Ro | cb767f6 | 2018-06-19 19:58:05 -0700 | [diff] [blame] | 161 | GenericAtom generic_atom = 82; |
jianjin | 6eada30 | 2019-02-28 11:25:57 -0800 | [diff] [blame] | 162 | KeyValuePairsAtom key_value_pairs_atom = 83 [(allow_from_any_uid) = true]; |
Bookatz | a7020bd | 2018-08-28 16:29:35 -0700 | [diff] [blame] | 163 | VibratorStateChanged vibrator_state_changed = 84; |
Yangster-mac | 9635300 | 2018-09-05 11:18:55 -0700 | [diff] [blame] | 164 | DeferredJobStatsReported deferred_job_stats_reported = 85; |
Tej Singh | a7234499 | 2019-04-17 18:55:08 -0700 | [diff] [blame] | 165 | ThermalThrottlingStateChanged thermal_throttling = 86 [deprecated=true]; |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 166 | BiometricAcquired biometric_acquired = 87; |
| 167 | BiometricAuthenticated biometric_authenticated = 88; |
| 168 | BiometricErrorOccurred biometric_error_occurred = 89; |
Will Brockman | fbaa791 | 2019-10-24 15:15:09 -0400 | [diff] [blame] | 169 | UiEventReported ui_event_reported = 90; |
Howard Ro | a46b658 | 2018-09-18 16:45:02 -0700 | [diff] [blame] | 170 | BatteryHealthSnapshot battery_health_snapshot = 91; |
| 171 | SlowIo slow_io = 92; |
| 172 | BatteryCausedShutdown battery_caused_shutdown = 93; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 173 | PhoneServiceStateChanged phone_service_state_changed = 94; |
| 174 | PhoneStateChanged phone_state_changed = 95; |
arangelov | d5db50e | 2018-10-12 20:24:39 +0100 | [diff] [blame] | 175 | UserRestrictionChanged user_restriction_changed = 96; |
Fan Zhang | 916c13b | 2018-10-16 22:49:45 -0700 | [diff] [blame] | 176 | SettingsUIChanged settings_ui_changed = 97; |
Chenjie Yu | ae9dfac | 2018-10-25 16:06:56 -0700 | [diff] [blame] | 177 | ConnectivityStateChanged connectivity_state_changed = 98; |
Chenjie Yu | 75b3c49 | 2018-10-06 21:45:19 -0700 | [diff] [blame] | 178 | // TODO: service state change is very noisy shortly after boot, as well |
| 179 | // as at other transitions - coming out of doze, device plugged in, etc. |
| 180 | // Consider removing this if it becomes a problem |
| 181 | ServiceStateChanged service_state_changed = 99; |
| 182 | ServiceLaunchReported service_launch_reported = 100; |
Tej Singh | 0d17695 | 2019-01-16 19:10:54 -0800 | [diff] [blame] | 183 | FlagFlipUpdateOccurred flag_flip_update_occurred = 101; |
Yangster-mac | b89807e | 2018-11-15 21:10:57 -0800 | [diff] [blame] | 184 | BinaryPushStateChanged binary_push_state_changed = 102; |
arangelov | 4e99406 | 2018-11-13 16:12:38 +0000 | [diff] [blame] | 185 | DevicePolicyEvent device_policy_event = 103; |
Muhammad Qureshi | bcf6606 | 2019-12-23 17:55:48 -0800 | [diff] [blame] | 186 | DocsUIFileOperationCanceledReported docs_ui_file_op_canceled = 104 [(module) = "docsui"]; |
| 187 | DocsUIFileOperationCopyMoveModeReported docs_ui_file_op_copy_move_mode_reported = |
| 188 | 105 [(module) = "docsui"]; |
| 189 | DocsUIFileOperationFailureReported docs_ui_file_op_failure = 106 [(module) = "docsui"]; |
| 190 | DocsUIFileOperationReported docs_ui_provider_file_op = 107 [(module) = "docsui"]; |
| 191 | DocsUIInvalidScopedAccessRequestReported docs_ui_invalid_scoped_access_request = |
| 192 | 108 [(module) = "docsui"]; |
| 193 | DocsUILaunchReported docs_ui_launch_reported = 109 [(module) = "docsui"]; |
| 194 | DocsUIRootVisitedReported docs_ui_root_visited = 110 [(module) = "docsui"]; |
| 195 | DocsUIStartupMsReported docs_ui_startup_ms = 111 [(module) = "docsui"]; |
| 196 | DocsUIUserActionReported docs_ui_user_action_reported = 112 [(module) = "docsui"]; |
Bookatz | da1798c | 2018-12-13 14:16:00 -0800 | [diff] [blame] | 197 | WifiEnabledStateChanged wifi_enabled_state_changed = 113; |
| 198 | WifiRunningStateChanged wifi_running_state_changed = 114; |
Ben Murdoch | bab399f | 2018-12-06 11:01:38 +0000 | [diff] [blame] | 199 | AppCompacted app_compacted = 115; |
Muhammad Qureshi | bcf6606 | 2019-12-23 17:55:48 -0800 | [diff] [blame] | 200 | NetworkDnsEventReported network_dns_event_reported = 116 [(module) = "resolv"]; |
shawnlin | 9a1392a | 2019-04-09 16:21:17 +0800 | [diff] [blame] | 201 | DocsUIPickerLaunchedFromReported docs_ui_picker_launched_from_reported = |
Muhammad Qureshi | bcf6606 | 2019-12-23 17:55:48 -0800 | [diff] [blame] | 202 | 117 [(module) = "docsui"]; |
| 203 | DocsUIPickResultReported docs_ui_pick_result_reported = 118 [(module) = "docsui"]; |
| 204 | DocsUISearchModeReported docs_ui_search_mode_reported = 119 [(module) = "docsui"]; |
| 205 | DocsUISearchTypeReported docs_ui_search_type_reported = 120 [(module) = "docsui"]; |
| 206 | DataStallEvent data_stall_event = 121 [(module) = "network_stack"]; |
Christian Brunschen | f86039e | 2018-12-21 12:26:14 +0000 | [diff] [blame] | 207 | RescuePartyResetReported rescue_party_reset_reported = 122; |
Mathew Inwood | b375be5 | 2019-01-04 11:36:25 +0000 | [diff] [blame] | 208 | SignedConfigReported signed_config_reported = 123; |
Yu-Han Yang | 8a1b51d | 2018-12-26 22:18:31 -0800 | [diff] [blame] | 209 | GnssNiEventReported gnss_ni_event_reported = 124; |
Jack He | ab86dbd2 | 2018-12-18 15:43:27 -0800 | [diff] [blame] | 210 | BluetoothLinkLayerConnectionEvent bluetooth_link_layer_connection_event = 125; |
Jack He | d9837c8 | 2019-01-09 01:19:13 -0800 | [diff] [blame] | 211 | BluetoothAclConnectionStateChanged bluetooth_acl_connection_state_changed = 126; |
| 212 | BluetoothScoConnectionStateChanged bluetooth_sco_connection_state_changed = 127; |
Felix Lopez Luis | d95346a | 2018-12-12 10:32:32 +0000 | [diff] [blame] | 213 | AppDowngraded app_downgraded = 128; |
| 214 | AppOptimizedAfterDowngraded app_optimized_after_downgraded = 129; |
| 215 | LowStorageStateChanged low_storage_state_changed = 130; |
Yu-Han Yang | 14d5fb4 | 2019-01-16 12:42:59 -0800 | [diff] [blame] | 216 | GnssNfwNotificationReported gnss_nfw_notification_reported = 131; |
| 217 | GnssConfigurationReported gnss_configuration_reported = 132; |
Maggie White | fc1aa59 | 2018-11-28 21:55:23 -0800 | [diff] [blame] | 218 | UsbPortOverheatEvent usb_port_overheat_event_reported = 133; |
Jack Yu | 95b64f3 | 2018-12-13 18:26:11 +0800 | [diff] [blame] | 219 | NfcErrorOccurred nfc_error_occurred = 134; |
| 220 | NfcStateChanged nfc_state_changed = 135; |
| 221 | NfcBeamOccurred nfc_beam_occurred = 136; |
| 222 | NfcCardemulationOccurred nfc_cardemulation_occurred = 137; |
| 223 | NfcTagOccurred nfc_tag_occurred = 138; |
| 224 | NfcHceTransactionOccurred nfc_hce_transaction_occurred = 139; |
| 225 | SeStateChanged se_state_changed = 140; |
| 226 | SeOmapiReported se_omapi_reported = 141; |
Ng Zhi An | 7ff7fdb | 2019-01-16 15:35:51 -0800 | [diff] [blame] | 227 | BroadcastDispatchLatencyReported broadcast_dispatch_latency_reported = 142; |
Alex Salo | a060aee | 2019-01-21 14:36:41 -0800 | [diff] [blame] | 228 | AttentionManagerServiceResultReported attention_manager_service_result_reported = 143; |
Michael Groover | 9e7b06e | 2018-12-28 19:55:51 -0800 | [diff] [blame] | 229 | AdbConnectionChanged adb_connection_changed = 144; |
Carter Hsu | b8fd1e9 | 2019-01-11 15:24:45 +0800 | [diff] [blame] | 230 | SpeechDspStatReported speech_dsp_stat_reported = 145; |
Badhri Jagan Sridharan | 129c729 | 2019-01-14 21:18:25 -0800 | [diff] [blame] | 231 | UsbContaminantReported usb_contaminant_reported = 146; |
Howard Ro | e103fe2 | 2019-01-17 16:52:16 -0800 | [diff] [blame] | 232 | WatchdogRollbackOccurred watchdog_rollback_occurred = 147; |
Kevin Chyn | e5a37fb | 2019-02-08 13:10:36 -0800 | [diff] [blame] | 233 | BiometricSystemHealthIssueDetected biometric_system_health_issue_detected = 148; |
Muhammad Qureshi | 9bced7d | 2020-01-16 15:22:12 -0800 | [diff] [blame] | 234 | BubbleUIChanged bubble_ui_changed = 149 [(module) = "sysui"]; |
Kweku Adams | 8845d01 | 2018-12-11 20:06:45 -0800 | [diff] [blame] | 235 | ScheduledJobConstraintChanged scheduled_job_constraint_changed = 150; |
Jack He | c27040a | 2019-01-09 20:54:41 -0800 | [diff] [blame] | 236 | BluetoothActiveDeviceChanged bluetooth_active_device_changed = 151; |
| 237 | BluetoothA2dpPlaybackStateChanged bluetooth_a2dp_playback_state_changed = 152; |
| 238 | BluetoothA2dpCodecConfigChanged bluetooth_a2dp_codec_config_changed = 153; |
| 239 | BluetoothA2dpCodecCapabilityChanged bluetooth_a2dp_codec_capability_changed = 154; |
| 240 | BluetoothA2dpAudioUnderrunReported bluetooth_a2dp_audio_underrun_reported = 155; |
| 241 | BluetoothA2dpAudioOverrunReported bluetooth_a2dp_audio_overrun_reported = 156; |
| 242 | BluetoothDeviceRssiReported bluetooth_device_rssi_reported = 157; |
| 243 | BluetoothDeviceFailedContactCounterReported bluetooth_device_failed_contact_counter_reported = 158; |
| 244 | BluetoothDeviceTxPowerLevelReported bluetooth_device_tx_power_level_reported = 159; |
Jack He | 1021a61 | 2019-01-20 21:22:46 -0800 | [diff] [blame] | 245 | BluetoothHciTimeoutReported bluetooth_hci_timeout_reported = 160; |
| 246 | BluetoothQualityReportReported bluetooth_quality_report_reported = 161; |
Jack He | aea2698 | 2019-04-04 11:19:48 -0700 | [diff] [blame] | 247 | BluetoothDeviceInfoReported bluetooth_device_info_reported = 162; |
Jack He | 1021a61 | 2019-01-20 21:22:46 -0800 | [diff] [blame] | 248 | BluetoothRemoteVersionInfoReported bluetooth_remote_version_info_reported = 163; |
| 249 | BluetoothSdpAttributeReported bluetooth_sdp_attribute_reported = 164; |
| 250 | BluetoothBondStateChanged bluetooth_bond_state_changed = 165; |
| 251 | BluetoothClassicPairingEventReported bluetooth_classic_pairing_event_reported = 166; |
| 252 | BluetoothSmpPairingEventReported bluetooth_smp_pairing_event_reported = 167; |
Alex Salo | d7c3eef | 2019-01-25 14:43:27 -0800 | [diff] [blame] | 253 | ScreenTimeoutExtensionReported screen_timeout_extension_reported = 168; |
Hui Yu | 885aca1 | 2019-01-10 17:11:34 -0800 | [diff] [blame] | 254 | ProcessStartTime process_start_time = 169; |
Philip P. Moltmann | b2f0c77 | 2019-04-11 14:41:21 -0700 | [diff] [blame] | 255 | PermissionGrantRequestResultReported permission_grant_request_result_reported = |
Muhammad Qureshi | bcf6606 | 2019-12-23 17:55:48 -0800 | [diff] [blame] | 256 | 170 [(module) = "permissioncontroller"]; |
Jack He | 815cdba | 2019-01-30 17:24:55 -0800 | [diff] [blame] | 257 | BluetoothSocketConnectionStateChanged bluetooth_socket_connection_state_changed = 171; |
Michael Groover | 4a0ca94 | 2019-01-24 17:41:25 -0800 | [diff] [blame] | 258 | DeviceIdentifierAccessDenied device_identifier_access_denied = 172; |
Steven Wu | 552f63f | 2019-02-05 13:41:36 -0500 | [diff] [blame] | 259 | BubbleDeveloperErrorReported bubble_developer_error_reported = 173; |
joshmccloskey | 8c3322e | 2019-01-09 18:25:57 -0800 | [diff] [blame] | 260 | AssistGestureStageReported assist_gesture_stage_reported = 174; |
| 261 | AssistGestureFeedbackReported assist_gesture_feedback_reported = 175; |
| 262 | AssistGestureProgressReported assist_gesture_progress_reported = 176; |
Philip Quinn | 0eded62 | 2019-01-29 12:46:28 -0800 | [diff] [blame] | 263 | TouchGestureClassified touch_gesture_classified = 177; |
Andrei Onea | 4ad6d0c | 2019-02-08 13:54:12 +0000 | [diff] [blame] | 264 | HiddenApiUsed hidden_api_used = 178 [(allow_from_any_uid) = true]; |
Muhammad Qureshi | 9bced7d | 2020-01-16 15:22:12 -0800 | [diff] [blame] | 265 | StyleUIChanged style_ui_changed = 179 [(module) = "sysui"]; |
Joel Galenson | 6f41b106 | 2019-04-16 12:22:41 -0700 | [diff] [blame] | 266 | PrivacyIndicatorsInteracted privacy_indicators_interacted = |
Muhammad Qureshi | bcf6606 | 2019-12-23 17:55:48 -0800 | [diff] [blame] | 267 | 180 [(module) = "permissioncontroller"]; |
Carmen Agimof | 6688a35 | 2019-01-30 19:36:04 +0000 | [diff] [blame] | 268 | AppInstallOnExternalStorageReported app_install_on_external_storage_reported = 181; |
Muhammad Qureshi | bcf6606 | 2019-12-23 17:55:48 -0800 | [diff] [blame] | 269 | NetworkStackReported network_stack_reported = 182 [(module) = "network_stack"]; |
Carmen Agimof | 6dcc503 | 2019-03-01 16:20:09 +0000 | [diff] [blame] | 270 | AppMovedStorageReported app_moved_storage_reported = 183; |
joshmccloskey | 6f952b2 | 2019-03-25 20:59:35 -0700 | [diff] [blame] | 271 | BiometricEnrolled biometric_enrolled = 184; |
jianjin | 8f2dee0 | 2019-03-29 14:03:08 -0700 | [diff] [blame] | 272 | SystemServerWatchdogOccurred system_server_watchdog_occurred = 185; |
| 273 | TombStoneOccurred tomb_stone_occurred = 186; |
Jack He | 7142680 | 2019-04-02 13:32:52 -0700 | [diff] [blame] | 274 | BluetoothClassOfDeviceReported bluetooth_class_of_device_reported = 187; |
Ben Blount | 763a5d5 | 2019-04-10 11:48:58 -0700 | [diff] [blame] | 275 | IntelligenceEventReported intelligence_event_reported = |
Muhammad Qureshi | bcf6606 | 2019-12-23 17:55:48 -0800 | [diff] [blame] | 276 | 188 [(module) = "intelligence"]; |
Tej Singh | a7234499 | 2019-04-17 18:55:08 -0700 | [diff] [blame] | 277 | ThermalThrottlingSeverityStateChanged thermal_throttling_severity_state_changed = 189; |
Hai Zhang | 5d3328d | 2019-04-13 21:25:06 +0800 | [diff] [blame] | 278 | RoleRequestResultReported role_request_result_reported = |
Muhammad Qureshi | bcf6606 | 2019-12-23 17:55:48 -0800 | [diff] [blame] | 279 | 190 [(module) = "permissioncontroller"]; |
Ray Essick | 8ab04df | 2019-02-15 11:01:02 -0800 | [diff] [blame] | 280 | MediametricsAudiopolicyReported mediametrics_audiopolicy_reported = 191; |
| 281 | MediametricsAudiorecordReported mediametrics_audiorecord_reported = 192; |
| 282 | MediametricsAudiothreadReported mediametrics_audiothread_reported = 193; |
| 283 | MediametricsAudiotrackReported mediametrics_audiotrack_reported = 194; |
| 284 | MediametricsCodecReported mediametrics_codec_reported = 195; |
| 285 | MediametricsDrmWidevineReported mediametrics_drm_widevine_reported = 196; |
| 286 | MediametricsExtractorReported mediametrics_extractor_reported = 197; |
| 287 | MediametricsMediadrmReported mediametrics_mediadrm_reported = 198; |
| 288 | MediametricsNuPlayerReported mediametrics_nuplayer_reported = 199; |
| 289 | MediametricsRecorderReported mediametrics_recorder_reported = 200; |
Robert Shih | a4beed3 | 2019-08-19 14:15:23 -0700 | [diff] [blame] | 290 | MediametricsDrmManagerReported mediametrics_drmmanager_reported = 201; |
Yuncheol Heo | d1a85d2 | 2019-05-08 17:13:42 -0700 | [diff] [blame] | 291 | CarPowerStateChanged car_power_state_changed = 203; |
| 292 | GarageModeInfo garage_mode_info = 204; |
Muhammad Qureshi | bcf6606 | 2019-12-23 17:55:48 -0800 | [diff] [blame] | 293 | TestAtomReported test_atom_reported = 205 [(module) = "cts"]; |
Adam He | 420947c | 2019-01-23 15:59:09 -0800 | [diff] [blame] | 294 | ContentCaptureCallerMismatchReported content_capture_caller_mismatch_reported = 206; |
| 295 | ContentCaptureServiceEvents content_capture_service_events = 207; |
| 296 | ContentCaptureSessionEvents content_capture_session_events = 208; |
| 297 | ContentCaptureFlushed content_capture_flushed = 209; |
Hongyi Zhang | 700137e | 2019-05-23 21:19:36 -0700 | [diff] [blame] | 298 | LocationManagerApiUsageReported location_manager_api_usage_reported = 210; |
Stanislav Zholnin | bdf620b | 2019-06-06 22:38:33 +0100 | [diff] [blame] | 299 | ReviewPermissionsFragmentResultReported review_permissions_fragment_result_reported = |
Muhammad Qureshi | bcf6606 | 2019-12-23 17:55:48 -0800 | [diff] [blame] | 300 | 211 [(module) = "permissioncontroller"]; |
Stanislav Zholnin | 247d1b7 | 2019-06-06 21:28:44 +0100 | [diff] [blame] | 301 | RuntimePermissionsUpgradeResult runtime_permissions_upgrade_result = |
Muhammad Qureshi | bcf6606 | 2019-12-23 17:55:48 -0800 | [diff] [blame] | 302 | 212 [(module) = "permissioncontroller"]; |
Stanislav Zholnin | bdf620b | 2019-06-06 22:38:33 +0100 | [diff] [blame] | 303 | GrantPermissionsActivityButtonActions grant_permissions_activity_button_actions = |
Muhammad Qureshi | bcf6606 | 2019-12-23 17:55:48 -0800 | [diff] [blame] | 304 | 213 [(module) = "permissioncontroller"]; |
Stanislav Zholnin | 375e2ab | 2019-05-29 13:07:35 +0100 | [diff] [blame] | 305 | LocationAccessCheckNotificationAction location_access_check_notification_action = |
Muhammad Qureshi | bcf6606 | 2019-12-23 17:55:48 -0800 | [diff] [blame] | 306 | 214 [(module) = "permissioncontroller"]; |
Stanislav Zholnin | 3e0f9bc | 2019-05-23 19:03:55 +0100 | [diff] [blame] | 307 | AppPermissionFragmentActionReported app_permission_fragment_action_reported = |
Muhammad Qureshi | bcf6606 | 2019-12-23 17:55:48 -0800 | [diff] [blame] | 308 | 215 [(module) = "permissioncontroller"]; |
Stanislav Zholnin | c9dda9e | 2019-06-02 20:50:13 +0100 | [diff] [blame] | 309 | AppPermissionFragmentViewed app_permission_fragment_viewed = |
Muhammad Qureshi | bcf6606 | 2019-12-23 17:55:48 -0800 | [diff] [blame] | 310 | 216 [(module) = "permissioncontroller"]; |
Stanislav Zholnin | dc3e2b3 | 2019-06-06 18:10:14 +0100 | [diff] [blame] | 311 | AppPermissionsFragmentViewed app_permissions_fragment_viewed = |
Muhammad Qureshi | bcf6606 | 2019-12-23 17:55:48 -0800 | [diff] [blame] | 312 | 217 [(module) = "permissioncontroller"]; |
Stanislav Zholnin | 32a89c1 | 2019-06-04 14:59:21 +0100 | [diff] [blame] | 313 | PermissionAppsFragmentViewed permission_apps_fragment_viewed = |
Muhammad Qureshi | bcf6606 | 2019-12-23 17:55:48 -0800 | [diff] [blame] | 314 | 218 [(module) = "permissioncontroller"]; |
| 315 | TextSelectionEvent text_selection_event = 219 [(module) = "textclassifier"]; |
| 316 | TextLinkifyEvent text_linkify_event = 220 [(module) = "textclassifier"]; |
| 317 | ConversationActionsEvent conversation_actions_event = 221 [(module) = "textclassifier"]; |
| 318 | LanguageDetectionEvent language_detection_event = 222 [(module) = "textclassifier"]; |
Hyunyoung Song | 2ecb886 | 2019-07-09 09:19:25 -0700 | [diff] [blame] | 319 | ExclusionRectStateChanged exclusion_rect_state_changed = 223; |
Muhammad Qureshi | 9bced7d | 2020-01-16 15:22:12 -0800 | [diff] [blame] | 320 | BackGesture back_gesture_reported_reported = 224 [(module) = "sysui"]; |
Tianjie Xu | 167c3db | 2019-07-22 14:25:14 -0700 | [diff] [blame] | 321 | UpdateEngineUpdateAttemptReported update_engine_update_attempt_reported = 225; |
| 322 | UpdateEngineSuccessfulUpdateReported update_engine_successful_update_reported = 226; |
Emilian Peev | 6729f37 | 2019-08-29 09:14:09 -0700 | [diff] [blame] | 323 | CameraActionEvent camera_action_event = 227; |
atrost | 01a2093 | 2019-08-28 15:40:37 +0100 | [diff] [blame] | 324 | AppCompatibilityChangeReported app_compatibility_change_reported = |
| 325 | 228 [(allow_from_any_uid) = true]; |
Muhammad Qureshi | bcf6606 | 2019-12-23 17:55:48 -0800 | [diff] [blame] | 326 | PerfettoUploaded perfetto_uploaded = 229 [(module) = "perfetto"]; |
Mark Tabry | a824a64 | 2019-11-05 12:26:12 -0800 | [diff] [blame] | 327 | VmsClientConnectionStateChanged vms_client_connection_state_changed = 230; |
Muhammad Qureshi | bcf6606 | 2019-12-23 17:55:48 -0800 | [diff] [blame] | 328 | MediaProviderScanEvent media_provider_scan_event = 233 [(module) = "mediaprovider"]; |
| 329 | MediaProviderDeletionEvent media_provider_deletion_event = 234 [(module) = "mediaprovider"]; |
Jeff Sharkey | 6bd2157 | 2019-11-15 20:45:33 -0700 | [diff] [blame] | 330 | MediaProviderPermissionEvent media_provider_permission_event = |
Muhammad Qureshi | bcf6606 | 2019-12-23 17:55:48 -0800 | [diff] [blame] | 331 | 235 [(module) = "mediaprovider"]; |
| 332 | MediaProviderSchemaChange media_provider_schema_change = 236 [(module) = "mediaprovider"]; |
Jeff Sharkey | 6bd2157 | 2019-11-15 20:45:33 -0700 | [diff] [blame] | 333 | MediaProviderIdleMaintenance media_provider_idle_maintenance = |
Muhammad Qureshi | bcf6606 | 2019-12-23 17:55:48 -0800 | [diff] [blame] | 334 | 237 [(module) = "mediaprovider"]; |
Kenny Root | 4eacaaa | 2020-01-08 20:48:13 -0800 | [diff] [blame] | 335 | RebootEscrowRecoveryReported reboot_escrow_recovery_reported = 238; |
Keun young Park | 3e033cb | 2019-12-18 11:27:35 -0800 | [diff] [blame] | 336 | BootTimeEventDuration boot_time_event_duration_reported = 239; |
| 337 | BootTimeEventElapsedTime boot_time_event_elapsed_time_reported = 240; |
| 338 | BootTimeEventUtcTime boot_time_event_utc_time_reported = 241; |
| 339 | BootTimeEventErrorCode boot_time_event_error_code_reported = 242; |
Nikita Ioffe | 41dd57e | 2020-01-10 16:05:08 +0000 | [diff] [blame] | 340 | UserspaceRebootReported userspace_reboot_reported = 243; |
Will Brockman | 079fdaa | 2020-01-12 16:45:03 -0500 | [diff] [blame] | 341 | NotificationReported notification_reported = 244; |
| 342 | NotificationPanelReported notification_panel_reported = 245; |
| 343 | NotificationChannelModified notification_panel_modified = 246; |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 344 | } |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 345 | |
David Chen | 6e3e6cb | 2018-01-03 16:14:06 -0800 | [diff] [blame] | 346 | // Pulled events will start at field 10000. |
Rafal Slawik | bdd5a50 | 2020-01-14 14:14:29 +0000 | [diff] [blame] | 347 | // Next: 10071 |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 348 | oneof pulled { |
David Chen | 6e3e6cb | 2018-01-03 16:14:06 -0800 | [diff] [blame] | 349 | WifiBytesTransfer wifi_bytes_transfer = 10000; |
| 350 | WifiBytesTransferByFgBg wifi_bytes_transfer_by_fg_bg = 10001; |
| 351 | MobileBytesTransfer mobile_bytes_transfer = 10002; |
| 352 | MobileBytesTransferByFgBg mobile_bytes_transfer_by_fg_bg = 10003; |
Chenjie Yu | 9d7720b | 2018-01-24 10:34:48 -0800 | [diff] [blame] | 353 | BluetoothBytesTransfer bluetooth_bytes_transfer = 10006; |
David Chen | 6e3e6cb | 2018-01-03 16:14:06 -0800 | [diff] [blame] | 354 | KernelWakelock kernel_wakelock = 10004; |
Chenjie Yu | c8b7f22 | 2018-01-11 23:25:57 -0800 | [diff] [blame] | 355 | SubsystemSleepState subsystem_sleep_state = 10005; |
David Chen | 6e3e6cb | 2018-01-03 16:14:06 -0800 | [diff] [blame] | 356 | CpuTimePerFreq cpu_time_per_freq = 10008; |
| 357 | CpuTimePerUid cpu_time_per_uid = 10009; |
| 358 | CpuTimePerUidFreq cpu_time_per_uid_freq = 10010; |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 359 | WifiActivityInfo wifi_activity_info = 10011; |
David Chen | 6e3e6cb | 2018-01-03 16:14:06 -0800 | [diff] [blame] | 360 | ModemActivityInfo modem_activity_info = 10012; |
Chenjie Yu | 9d7720b | 2018-01-24 10:34:48 -0800 | [diff] [blame] | 361 | BluetoothActivityInfo bluetooth_activity_info = 10007; |
Rajeev Kumar | 8a9fa05 | 2018-01-25 19:03:09 -0800 | [diff] [blame] | 362 | ProcessMemoryState process_memory_state = 10013; |
Chenjie Yu | 9d7720b | 2018-01-24 10:34:48 -0800 | [diff] [blame] | 363 | SystemElapsedRealtime system_elapsed_realtime = 10014; |
| 364 | SystemUptime system_uptime = 10015; |
Chenjie Yu | 9da105b | 2018-01-13 12:41:08 -0800 | [diff] [blame] | 365 | CpuActiveTime cpu_active_time = 10016; |
| 366 | CpuClusterTime cpu_cluster_time = 10017; |
Tej Singh | 86dc9db | 2018-09-06 00:39:57 +0000 | [diff] [blame] | 367 | DiskSpace disk_space = 10018 [deprecated=true]; |
Tej Singh | bf972d9 | 2018-01-10 20:51:13 -0800 | [diff] [blame] | 368 | RemainingBatteryCapacity remaining_battery_capacity = 10019; |
| 369 | FullBatteryCapacity full_battery_capacity = 10020; |
Tej Singh | 4029831 | 2018-02-16 00:15:09 -0800 | [diff] [blame] | 370 | Temperature temperature = 10021; |
Olivier Gaillard | 00bfb1b | 2018-07-10 11:25:09 +0100 | [diff] [blame] | 371 | BinderCalls binder_calls = 10022; |
Olivier Gaillard | 9ea238d | 2018-07-24 10:26:31 +0100 | [diff] [blame] | 372 | BinderCallsExceptions binder_calls_exceptions = 10023; |
Marcin Oczeretko | d8cc859 | 2018-08-22 16:07:36 +0100 | [diff] [blame] | 373 | LooperStats looper_stats = 10024; |
Tej Singh | 86dc9db | 2018-09-06 00:39:57 +0000 | [diff] [blame] | 374 | DiskStats disk_stats = 10025; |
| 375 | DirectoryUsage directory_usage = 10026; |
| 376 | AppSize app_size = 10027; |
| 377 | CategorySize category_size = 10028; |
Chenjie Yu | ab53020 | 2018-09-26 12:39:20 -0700 | [diff] [blame] | 378 | ProcStats proc_stats = 10029; |
Bookatz | 17f0d8a | 2018-09-13 12:56:32 -0700 | [diff] [blame] | 379 | BatteryVoltage battery_voltage = 10030; |
joshmccloskey | 5dcb408 | 2019-02-26 15:28:37 -0800 | [diff] [blame] | 380 | NumFingerprintsEnrolled num_fingerprints_enrolled = 10031; |
Tej Singh | e7726dc | 2018-09-21 11:42:12 -0700 | [diff] [blame] | 381 | DiskIo disk_io = 10032; |
Chenjie Yu | ab53020 | 2018-09-26 12:39:20 -0700 | [diff] [blame] | 382 | PowerProfile power_profile = 10033; |
Chenjie Yu | f910b780 | 2019-01-11 16:08:20 -0800 | [diff] [blame] | 383 | ProcStatsPkgProc proc_stats_pkg_proc = 10034; |
Yangster-mac | 308ea0c | 2018-10-22 13:10:25 -0700 | [diff] [blame] | 384 | ProcessCpuTime process_cpu_time = 10035; |
Misha Wagner | 5a51e00 | 2018-10-03 15:04:09 +0100 | [diff] [blame] | 385 | CpuTimePerThreadFreq cpu_time_per_thread_freq = 10037; |
Bookatz | 92da283 | 2018-11-01 18:10:03 -0700 | [diff] [blame] | 386 | OnDevicePowerMeasurement on_device_power_measurement = 10038; |
Bookatz | 75ee604 | 2018-11-09 12:27:37 -0800 | [diff] [blame] | 387 | DeviceCalculatedPowerUse device_calculated_power_use = 10039; |
| 388 | DeviceCalculatedPowerBlameUid device_calculated_power_blame_uid = 10040; |
| 389 | DeviceCalculatedPowerBlameOther device_calculated_power_blame_other = 10041; |
Rafal Slawik | 3bea895 | 2018-11-15 12:39:33 +0000 | [diff] [blame] | 390 | ProcessMemoryHighWaterMark process_memory_high_water_mark = 10042; |
Tej Singh | b1dbc8b | 2018-11-19 15:49:47 -0800 | [diff] [blame] | 391 | BatteryLevel battery_level = 10043; |
Bookatz | 366a443 | 2018-11-20 09:42:33 -0800 | [diff] [blame] | 392 | BuildInformation build_information = 10044; |
Maggie White | 8735b85 | 2019-01-18 11:40:49 -0800 | [diff] [blame] | 393 | BatteryCycleCount battery_cycle_count = 10045; |
Olivier Gaillard | 18d45220 | 2019-01-22 15:03:41 +0000 | [diff] [blame] | 394 | DebugElapsedClock debug_elapsed_clock = 10046; |
| 395 | DebugFailingElapsedClock debug_failing_elapsed_clock = 10047; |
joshmccloskey | 5dcb408 | 2019-02-26 15:28:37 -0800 | [diff] [blame] | 396 | NumFacesEnrolled num_faces_enrolled = 10048; |
Philip P. Moltmann | 70b42ae | 2019-01-29 16:24:19 -0800 | [diff] [blame] | 397 | RoleHolder role_holder = 10049; |
Philip P. Moltmann | f21a350 | 2019-01-30 09:53:04 -0800 | [diff] [blame] | 398 | DangerousPermissionState dangerous_permission_state = 10050; |
Chenjie Yu | e13f44a | 2019-02-07 17:51:38 -0800 | [diff] [blame] | 399 | TrainInfo train_info = 10051; |
Neil Fuller | db14b48 | 2019-02-05 19:44:44 +0000 | [diff] [blame] | 400 | TimeZoneDataInfo time_zone_data_info = 10052; |
Carmen Agimof | 12dec12 | 2019-03-06 16:14:38 +0000 | [diff] [blame] | 401 | ExternalStorageInfo external_storage_info = 10053; |
Yiwei Zhang | 5c81b63 | 2019-03-01 15:39:46 -0800 | [diff] [blame] | 402 | GpuStatsGlobalInfo gpu_stats_global_info = 10054; |
| 403 | GpuStatsAppInfo gpu_stats_app_info = 10055; |
Rafal Slawik | bdd5a50 | 2020-01-14 14:14:29 +0000 | [diff] [blame] | 404 | SystemIonHeapSize system_ion_heap_size = 10056 [deprecated = true]; |
Carmen Agimof | a769c15 | 2019-03-04 14:39:14 +0000 | [diff] [blame] | 405 | AppsOnExternalStorageInfo apps_on_external_storage_info = 10057; |
joshmccloskey | 34c1f8e | 2019-04-11 14:06:43 -0700 | [diff] [blame] | 406 | FaceSettings face_settings = 10058; |
Maggie White | 442b631 | 2019-04-05 16:26:44 -0700 | [diff] [blame] | 407 | CoolingDevice cooling_device = 10059; |
Martijn Coenen | cd95d46 | 2019-04-25 17:09:45 +0200 | [diff] [blame] | 408 | AppOps app_ops = 10060; |
Rafal Slawik | 77987ed | 2019-06-17 12:28:23 +0100 | [diff] [blame] | 409 | ProcessSystemIonHeapSize process_system_ion_heap_size = 10061; |
Alec Mouri | e088e76 | 2019-07-02 13:10:55 -0700 | [diff] [blame] | 410 | SurfaceflingerStatsGlobalInfo surfaceflinger_stats_global_info = 10062; |
| 411 | SurfaceflingerStatsLayerInfo surfaceflinger_stats_layer_info = 10063; |
Rafal Slawik | 7efcefb | 2019-09-20 11:16:20 +0100 | [diff] [blame] | 412 | ProcessMemorySnapshot process_memory_snapshot = 10064; |
Mark Tabry | a824a64 | 2019-11-05 12:26:12 -0800 | [diff] [blame] | 413 | VmsClientStats vms_client_stats = 10065; |
Chris Wren | cdea3b7 | 2019-11-22 16:58:17 -0500 | [diff] [blame] | 414 | NotificationRemoteViews notification_remote_views = 10066; |
Stanislav Zholnin | ccb82e4 | 2019-11-29 18:59:49 +0000 | [diff] [blame] | 415 | DangerousPermissionStateSampled dangerous_permission_state_sampled = 10067; |
Stan Iliev | 637ba5e | 2019-08-16 13:43:08 -0400 | [diff] [blame] | 416 | GraphicsStats graphics_stats = 10068; |
Stanislav Zholnin | 606454c | 2019-11-27 15:31:49 +0000 | [diff] [blame] | 417 | RuntimeAppOpsAccess runtime_app_ops_access = 10069; |
Rafal Slawik | bdd5a50 | 2020-01-14 14:14:29 +0000 | [diff] [blame] | 418 | IonHeapSize ion_heap_size = 10070; |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 419 | } |
yro | a1fe77c | 2018-02-26 14:22:54 -0800 | [diff] [blame] | 420 | |
Bookatz | 76aafcf | 2018-09-17 16:17:10 -0700 | [diff] [blame] | 421 | // DO NOT USE field numbers above 100,000 in AOSP. |
| 422 | // Field numbers 100,000 - 199,999 are reserved for non-AOSP (e.g. OEMs) to use. |
| 423 | // 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] | 424 | |
| 425 | reserved 10036; |
Stefan Lafon | cdb1a0e | 2017-09-27 20:24:15 -0700 | [diff] [blame] | 426 | } |
| 427 | |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 428 | /** |
Yangster-mac | 2087716 | 2017-12-22 17:19:39 -0800 | [diff] [blame] | 429 | * This proto represents a node of an attribution chain. |
| 430 | * Note: All attribution chains are represented as a repeated field of type |
| 431 | * AttributionNode. It is understood that in such arrays, the order is that |
| 432 | * 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] | 433 | */ |
Yangster-mac | 2087716 | 2017-12-22 17:19:39 -0800 | [diff] [blame] | 434 | message AttributionNode { |
| 435 | // The uid for a given element in the attribution chain. |
Yangster-mac | 7604aea | 2017-12-11 22:55:49 -0800 | [diff] [blame] | 436 | optional int32 uid = 1; |
Yangster-mac | 7604aea | 2017-12-11 22:55:49 -0800 | [diff] [blame] | 437 | |
Yangster-mac | 2087716 | 2017-12-22 17:19:39 -0800 | [diff] [blame] | 438 | // The (optional) string tag for an element in the attribution chain. If the |
| 439 | // element has no tag, it is encoded as an empty string. |
| 440 | optional string tag = 2; |
Stefan Lafon | cdb1a0e | 2017-09-27 20:24:15 -0700 | [diff] [blame] | 441 | } |
| 442 | |
Yangster-mac | 48b3d62 | 2018-08-18 12:38:11 -0700 | [diff] [blame] | 443 | message KeyValuePair { |
| 444 | optional int32 key = 1; |
| 445 | oneof value { |
Howard Ro | 4078dd4 | 2018-09-27 17:41:08 -0700 | [diff] [blame] | 446 | int32 value_int = 2; |
| 447 | int64 value_long = 3; |
| 448 | string value_str = 4; |
| 449 | float value_float = 5; |
Yangster-mac | 48b3d62 | 2018-08-18 12:38:11 -0700 | [diff] [blame] | 450 | } |
| 451 | } |
| 452 | |
| 453 | message KeyValuePairsAtom { |
| 454 | optional int32 uid = 1; |
| 455 | repeated KeyValuePair pairs = 2; |
| 456 | } |
| 457 | |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 458 | /* |
| 459 | * ***************************************************************************** |
yro | de4ca10 | 2017-11-15 22:57:24 -0800 | [diff] [blame] | 460 | * 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] | 461 | * |
| 462 | * RULES: |
| 463 | * - The field ids for each atom must start at 1, and count upwards by 1. |
| 464 | * Skipping field ids is not allowed. |
| 465 | * - These form an API, so renaming, renumbering or removing fields is |
| 466 | * not allowed between android releases. (This is not currently enforced, |
| 467 | * but there will be a tool to enforce this restriction). |
| 468 | * - The types must be built-in protocol buffer types, namely, no sub-messages |
| 469 | * are allowed (yet). The bytes type is also not allowed. |
| 470 | * - The CamelCase name of the message type should match the |
Stefan Lafon | ae2df01 | 2017-11-14 09:17:21 -0800 | [diff] [blame] | 471 | * underscore_separated name as defined in Atom. |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 472 | * - 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] | 473 | * be exactly one AttributionChain field. It must be field number 1. |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 474 | * - A field that is a uid should be a string field, tagged with the [xxx] |
| 475 | * annotation. The generated code on android will be represented by UIDs, |
| 476 | * and those UIDs will be translated in xxx to those strings. |
| 477 | * |
| 478 | * CONVENTIONS: |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 479 | * - Events are past tense. e.g. ScreenStateChanged, not ScreenStateChange. |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 480 | * - If there is a UID, it goes first. Think in an object-oriented fashion. |
| 481 | * ***************************************************************************** |
| 482 | */ |
Stefan Lafon | cdb1a0e | 2017-09-27 20:24:15 -0700 | [diff] [blame] | 483 | |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 484 | /** |
Tej Singh | a7234499 | 2019-04-17 18:55:08 -0700 | [diff] [blame] | 485 | * This atom is deprecated starting in Q. Please use ThermalThrottlingSeverityStateChanged. |
Yangster-mac | e16189a | 2018-08-26 12:20:16 -0700 | [diff] [blame] | 486 | * Logs when the Thermal service HAL notifies the throttling start/stop events. |
| 487 | * |
| 488 | * Logged from: |
| 489 | * frameworks/base/services/core/java/com/android/server/stats/StatsCompanionService.java |
| 490 | */ |
| 491 | message ThermalThrottlingStateChanged { |
Maggie White | 442b631 | 2019-04-05 16:26:44 -0700 | [diff] [blame] | 492 | // The type of temperature being reported (CPU, GPU, SKIN, etc) |
Yangster-mac | e16189a | 2018-08-26 12:20:16 -0700 | [diff] [blame] | 493 | optional android.os.TemperatureTypeEnum sensor_type = 1; |
| 494 | |
Maggie White | 442b631 | 2019-04-05 16:26:44 -0700 | [diff] [blame] | 495 | // Throttling state, this field is DEPRECATED |
Yangster-mac | e16189a | 2018-08-26 12:20:16 -0700 | [diff] [blame] | 496 | enum State { |
| 497 | UNKNOWN = 0; |
Maggie White | 442b631 | 2019-04-05 16:26:44 -0700 | [diff] [blame] | 498 | START = 1; // START indicated that throttling was triggered. |
| 499 | STOP = 2; // STOP indicates that throttling was cleared. |
Yangster-mac | e16189a | 2018-08-26 12:20:16 -0700 | [diff] [blame] | 500 | } |
Yangster-mac | e16189a | 2018-08-26 12:20:16 -0700 | [diff] [blame] | 501 | optional State state = 2; |
| 502 | |
| 503 | optional float temperature = 3; |
| 504 | } |
| 505 | |
| 506 | /** |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 507 | * Logs when the screen state changes. |
| 508 | * |
| 509 | * Logged from: |
| 510 | * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java |
| 511 | */ |
| 512 | message ScreenStateChanged { |
Bookatz | 1a1b046 | 2018-01-12 11:47:03 -0800 | [diff] [blame] | 513 | // New screen state, from frameworks/base/core/proto/android/view/enums.proto. |
Yangster-mac | b6b77c6 | 2018-10-12 19:33:24 -0700 | [diff] [blame] | 514 | optional android.view.DisplayStateEnum state = 1 [(state_field_option).option = EXCLUSIVE]; |
Stefan Lafon | cdb1a0e | 2017-09-27 20:24:15 -0700 | [diff] [blame] | 515 | } |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 516 | |
| 517 | /** |
Chenjie Yu | bd1a28f | 2018-07-17 14:55:19 -0700 | [diff] [blame] | 518 | * Logs that the process state of the uid, as determined by ActivityManager |
| 519 | * (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] | 520 | * |
| 521 | * Logged from: |
| 522 | * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java |
| 523 | */ |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 524 | message UidProcessStateChanged { |
Yangster-mac | b6b77c6 | 2018-10-12 19:33:24 -0700 | [diff] [blame] | 525 | optional int32 uid = 1 [(state_field_option).option = PRIMARY, (is_uid) = true]; |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 526 | |
Bookatz | db026a2 | 2018-01-10 19:01:56 -0800 | [diff] [blame] | 527 | // The state, from frameworks/base/core/proto/android/app/enums.proto. |
Yangster-mac | b6b77c6 | 2018-10-12 19:33:24 -0700 | [diff] [blame] | 528 | optional android.app.ProcessStateEnum state = 2 [(state_field_option).option = EXCLUSIVE]; |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 529 | } |
| 530 | |
| 531 | /** |
Chenjie Yu | bd1a28f | 2018-07-17 14:55:19 -0700 | [diff] [blame] | 532 | * Logs process state change of a process, as per the activity manager. |
| 533 | * |
| 534 | * Logged from: |
| 535 | * frameworks/base/services/core/java/com/android/server/am/ProcessRecord.java |
| 536 | */ |
| 537 | message ProcessStateChanged { |
| 538 | optional int32 uid = 1; |
| 539 | optional string process_name = 2; |
| 540 | optional string package_name = 3; |
| 541 | // TODO: remove this when validation is done |
| 542 | optional int64 version = 5; |
| 543 | // The state, from frameworks/base/core/proto/android/app/enums.proto. |
| 544 | optional android.app.ProcessStateEnum state = 4; |
| 545 | } |
| 546 | |
| 547 | /** |
| 548 | * Logs when ActivityManagerService sleep state is changed. |
| 549 | * |
| 550 | * Logged from: |
| 551 | * frameworks/base/services/core/java/com/android/server/am/ActivityTaskManagerService.java |
| 552 | */ |
| 553 | message ActivityManagerSleepStateChanged { |
| 554 | // TODO: import frameworks proto |
| 555 | enum State { |
| 556 | UNKNOWN = 0; |
| 557 | ASLEEP = 1; |
| 558 | AWAKE = 2; |
| 559 | } |
Yangster-mac | b6b77c6 | 2018-10-12 19:33:24 -0700 | [diff] [blame] | 560 | optional State state = 1 [(state_field_option).option = EXCLUSIVE]; |
Chenjie Yu | bd1a28f | 2018-07-17 14:55:19 -0700 | [diff] [blame] | 561 | } |
| 562 | |
| 563 | /** |
| 564 | * Logs when system memory state changes. |
| 565 | * |
| 566 | * Logged from: |
| 567 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
| 568 | */ |
| 569 | message MemoryFactorStateChanged { |
| 570 | // TODO: import frameworks proto |
| 571 | enum State { |
| 572 | MEMORY_UNKNOWN = 0; |
| 573 | NORMAL = 1; // normal. |
| 574 | MODERATE = 2; // moderate memory pressure. |
| 575 | LOW = 3; // low memory. |
| 576 | CRITICAL = 4; // critical memory. |
| 577 | |
| 578 | } |
Yangster-mac | b6b77c6 | 2018-10-12 19:33:24 -0700 | [diff] [blame] | 579 | optional State factor = 1 [(state_field_option).option = EXCLUSIVE]; |
Chenjie Yu | bd1a28f | 2018-07-17 14:55:19 -0700 | [diff] [blame] | 580 | } |
| 581 | |
| 582 | /** |
| 583 | * Logs when app is using too much cpu, according to ActivityManagerService. |
| 584 | * |
| 585 | * Logged from: |
| 586 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
| 587 | */ |
| 588 | message ExcessiveCpuUsageReported { |
| 589 | optional int32 uid = 1; |
| 590 | optional string process_name = 2; |
| 591 | optional string package_name = 3; |
| 592 | // package version. TODO: remove this when validation is done |
| 593 | optional int64 version = 4; |
| 594 | } |
| 595 | |
| 596 | /** |
| 597 | * Logs when a cached process is killed, along with its pss. |
| 598 | * |
| 599 | * Logged from: |
| 600 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
| 601 | */ |
| 602 | message CachedKillReported { |
| 603 | optional int32 uid = 1; |
| 604 | optional string process_name = 2; |
| 605 | optional string package_name = 3; |
| 606 | // TODO: remove this when validation is done |
| 607 | optional int64 version = 5; |
| 608 | optional int64 pss = 4; |
| 609 | } |
| 610 | |
| 611 | /** |
| 612 | * Logs when memory stats of a process is reported. |
| 613 | * |
| 614 | * Logged from: |
| 615 | * frameworks/base/services/core/java/com/android/server/am/ProcessRecord.java |
| 616 | */ |
| 617 | message ProcessMemoryStatReported { |
| 618 | optional int32 uid = 1; |
| 619 | optional string process_name = 2; |
| 620 | optional string package_name = 3; |
| 621 | //TODO: remove this when validation is done |
| 622 | optional int64 version = 9; |
| 623 | optional int64 pss = 4; |
| 624 | optional int64 uss = 5; |
| 625 | optional int64 rss = 6; |
| 626 | enum Type { |
| 627 | ADD_PSS_INTERNAL_SINGLE = 0; |
| 628 | ADD_PSS_INTERNAL_ALL_MEM = 1; |
| 629 | ADD_PSS_INTERNAL_ALL_POLL = 2; |
| 630 | ADD_PSS_EXTERNAL = 3; |
| 631 | ADD_PSS_EXTERNAL_SLOW = 4; |
| 632 | } |
| 633 | optional Type type = 7; |
Muhammad Qureshi | dda7320 | 2019-03-07 13:54:20 -0800 | [diff] [blame] | 634 | optional int64 duration_millis = 8; |
Chenjie Yu | bd1a28f | 2018-07-17 14:55:19 -0700 | [diff] [blame] | 635 | } |
| 636 | |
| 637 | /** |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 638 | * Logs that a process started, finished, crashed, or ANRed. |
| 639 | * |
| 640 | * Logged from: |
| 641 | * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java |
| 642 | */ |
| 643 | message ProcessLifeCycleStateChanged { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 644 | optional int32 uid = 1 [(is_uid) = true]; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 645 | |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 646 | // The process name (usually same as the app name). |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 647 | optional string process_name = 2; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 648 | |
Bookatz | ddccf0a | 2017-11-28 16:48:14 -0800 | [diff] [blame] | 649 | // What lifecycle state the process changed to. |
| 650 | // This enum is specific to atoms.proto. |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 651 | enum State { |
| 652 | FINISHED = 0; |
| 653 | STARTED = 1; |
| 654 | CRASHED = 2; |
Bookatz | ddccf0a | 2017-11-28 16:48:14 -0800 | [diff] [blame] | 655 | } |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 656 | optional State state = 3; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 657 | } |
| 658 | |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 659 | /** |
| 660 | * Logs when the ble scan state changes. |
| 661 | * |
| 662 | * Logged from: |
Bookatz | 17a879d | 2018-03-28 15:05:28 -0700 | [diff] [blame] | 663 | * packages/apps/Bluetooth/src/com/android/bluetooth/gatt/AppScanStats.java |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 664 | */ |
| 665 | message BleScanStateChanged { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 666 | repeated AttributionNode attribution_node = 1; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 667 | |
| 668 | enum State { |
| 669 | OFF = 0; |
| 670 | ON = 1; |
Bookatz | e5ec0b4 | 2018-03-26 13:34:56 -0700 | [diff] [blame] | 671 | // RESET indicates all ble stopped. Used when it (re)starts (e.g. after it crashes). |
| 672 | RESET = 2; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 673 | } |
| 674 | optional State state = 2; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 675 | |
Bookatz | e5ec0b4 | 2018-03-26 13:34:56 -0700 | [diff] [blame] | 676 | // Does the scan have a filter. |
| 677 | optional bool is_filtered = 3; |
| 678 | // Whether the scan is a CALLBACK_TYPE_FIRST_MATCH scan. Called 'background' scan internally. |
| 679 | optional bool is_first_match = 4; |
| 680 | // Whether the scan set to piggy-back off the results of other scans (SCAN_MODE_OPPORTUNISTIC). |
| 681 | optional bool is_opportunistic = 5; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 682 | } |
| 683 | |
| 684 | /** |
| 685 | * Logs reporting of a ble scan finding results. |
| 686 | * |
| 687 | * Logged from: |
Bookatz | ae6738e | 2018-09-13 11:38:56 -0700 | [diff] [blame] | 688 | * packages/apps/Bluetooth/src/com/android/bluetooth/gatt/AppScanStats.java |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 689 | */ |
Bookatz | ae6738e | 2018-09-13 11:38:56 -0700 | [diff] [blame] | 690 | // TODO: Consider also tracking per-scanner-id. |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 691 | message BleScanResultReceived { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 692 | repeated AttributionNode attribution_node = 1; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 693 | |
| 694 | // Number of ble scan results returned. |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 695 | optional int32 num_results = 2; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 696 | } |
| 697 | |
| 698 | /** |
| 699 | * Logs when a sensor state changes. |
| 700 | * |
| 701 | * Logged from: |
Bookatz | 235343d | 2018-03-26 13:03:50 -0700 | [diff] [blame] | 702 | * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 703 | */ |
| 704 | message SensorStateChanged { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 705 | repeated AttributionNode attribution_node = 1; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 706 | |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 707 | // The id (int) of the sensor. |
| 708 | optional int32 sensor_id = 2; |
| 709 | |
| 710 | enum State { |
| 711 | OFF = 0; |
| 712 | ON = 1; |
| 713 | } |
| 714 | optional State state = 3; |
| 715 | } |
| 716 | |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 717 | /** |
| 718 | * Logs when GPS state changes. |
| 719 | * |
| 720 | * Logged from: |
| 721 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
| 722 | */ |
| 723 | message GpsScanStateChanged { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 724 | repeated AttributionNode attribution_node = 1; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 725 | |
| 726 | enum State { |
| 727 | OFF = 0; |
| 728 | ON = 1; |
| 729 | } |
| 730 | optional State state = 2; |
| 731 | } |
| 732 | |
Bookatz | 48d362e | 2018-11-06 15:49:08 -0800 | [diff] [blame] | 733 | /** |
| 734 | * Logs when GPS signal quality. |
| 735 | * |
| 736 | * Logged from: |
| 737 | * /frameworks/base/location/java/com/android/internal/location/gnssmetrics/GnssMetrics.java |
| 738 | */ |
| 739 | message GpsSignalQualityChanged { |
| 740 | optional android.server.location.GpsSignalQualityEnum level = 1; |
| 741 | } |
| 742 | |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 743 | |
| 744 | /** |
| 745 | * Logs when a sync manager sync state changes. |
| 746 | * |
| 747 | * Logged from: |
Bookatz | 235343d | 2018-03-26 13:03:50 -0700 | [diff] [blame] | 748 | * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 749 | */ |
| 750 | message SyncStateChanged { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 751 | repeated AttributionNode attribution_node = 1; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 752 | |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 753 | // 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] | 754 | optional string sync_name = 2; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 755 | |
| 756 | enum State { |
| 757 | OFF = 0; |
| 758 | ON = 1; |
| 759 | } |
| 760 | optional State state = 3; |
| 761 | } |
| 762 | |
Yangster-mac | 9635300 | 2018-09-05 11:18:55 -0700 | [diff] [blame] | 763 | /* |
| 764 | * Deferred job stats. |
| 765 | * |
| 766 | * Logged from: |
| 767 | * frameworks/base/services/core/java/com/android/server/job/JobSchedulerService.java |
| 768 | */ |
| 769 | message DeferredJobStatsReported { |
| 770 | repeated AttributionNode attribution_node = 1; |
| 771 | |
| 772 | // Number of jobs deferred. |
| 773 | optional int32 num_jobs_deferred = 2; |
| 774 | |
| 775 | // Time since the last job runs. |
| 776 | optional int64 time_since_last_job_millis = 3; |
| 777 | } |
| 778 | |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 779 | /** |
| 780 | * Logs when a job scheduler job state changes. |
| 781 | * |
| 782 | * Logged from: |
Bookatz | 235343d | 2018-03-26 13:03:50 -0700 | [diff] [blame] | 783 | * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 784 | */ |
| 785 | message ScheduledJobStateChanged { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 786 | repeated AttributionNode attribution_node = 1; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 787 | |
| 788 | // Name of the job (as named in the app) |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 789 | optional string job_name = 2; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 790 | |
| 791 | enum State { |
Tej Singh | d5747a6 | 2018-01-08 20:57:35 -0800 | [diff] [blame] | 792 | FINISHED = 0; |
| 793 | STARTED = 1; |
| 794 | SCHEDULED = 2; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 795 | } |
| 796 | optional State state = 3; |
| 797 | |
Tej Singh | 33a412b | 2018-03-16 18:43:59 -0700 | [diff] [blame] | 798 | // The reason a job has stopped. |
| 799 | // This is only applicable when the state is FINISHED. |
Bookatz | 235343d | 2018-03-26 13:03:50 -0700 | [diff] [blame] | 800 | // The default value is STOP_REASON_UNKNOWN. |
Tej Singh | 33a412b | 2018-03-16 18:43:59 -0700 | [diff] [blame] | 801 | optional android.app.job.StopReasonEnum stop_reason = 4; |
Ben Murdoch | 741e335 | 2019-05-09 11:27:28 +0100 | [diff] [blame] | 802 | |
| 803 | // The standby bucket of the app that scheduled the job. These match the framework constants |
| 804 | // defined in JobSchedulerService.java with the addition of UNKNOWN using -1, as ACTIVE is |
| 805 | // already assigned 0. |
| 806 | enum Bucket { |
| 807 | UNKNOWN = -1; |
| 808 | ACTIVE = 0; |
| 809 | WORKING_SET = 1; |
| 810 | FREQUENT = 2; |
| 811 | RARE = 3; |
| 812 | NEVER = 4; |
Kweku Adams | ae9d6be | 2020-01-14 16:10:14 -0800 | [diff] [blame] | 813 | RESTRICTED = 5; |
Ben Murdoch | 741e335 | 2019-05-09 11:27:28 +0100 | [diff] [blame] | 814 | } |
| 815 | optional Bucket standby_bucket = 5 [default = UNKNOWN]; |
| 816 | |
| 817 | // The job id (as assigned by the app). |
| 818 | optional int32 job_id = 6; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 819 | } |
| 820 | |
| 821 | /** |
| 822 | * Logs when the audio state changes. |
| 823 | * |
| 824 | * Logged from: |
Bookatz | 235343d | 2018-03-26 13:03:50 -0700 | [diff] [blame] | 825 | * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 826 | */ |
| 827 | message AudioStateChanged { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 828 | repeated AttributionNode attribution_node = 1; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 829 | |
| 830 | enum State { |
| 831 | OFF = 0; |
| 832 | ON = 1; |
Bookatz | 235343d | 2018-03-26 13:03:50 -0700 | [diff] [blame] | 833 | // RESET indicates all audio stopped. Used when it (re)starts (e.g. after it crashes). |
| 834 | RESET = 2; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 835 | } |
| 836 | optional State state = 2; |
| 837 | } |
| 838 | |
| 839 | /** |
| 840 | * Logs when the video codec state changes. |
| 841 | * |
| 842 | * Logged from: |
Bookatz | 235343d | 2018-03-26 13:03:50 -0700 | [diff] [blame] | 843 | * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 844 | */ |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 845 | message MediaCodecStateChanged { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 846 | repeated AttributionNode attribution_node = 1; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 847 | |
| 848 | enum State { |
| 849 | OFF = 0; |
| 850 | ON = 1; |
Bookatz | 235343d | 2018-03-26 13:03:50 -0700 | [diff] [blame] | 851 | // RESET indicates all mediaCodec stopped. Used when it (re)starts (e.g. after it crashes). |
| 852 | RESET = 2; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 853 | } |
| 854 | optional State state = 2; |
| 855 | } |
| 856 | |
| 857 | /** |
| 858 | * Logs when the flashlight state changes. |
| 859 | * |
| 860 | * Logged from: |
Bookatz | 235343d | 2018-03-26 13:03:50 -0700 | [diff] [blame] | 861 | * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 862 | */ |
| 863 | message FlashlightStateChanged { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 864 | repeated AttributionNode attribution_node = 1; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 865 | |
| 866 | enum State { |
| 867 | OFF = 0; |
| 868 | ON = 1; |
Bookatz | 235343d | 2018-03-26 13:03:50 -0700 | [diff] [blame] | 869 | // RESET indicates all flashlight stopped. Used when it (re)starts (e.g. after it crashes). |
| 870 | RESET = 2; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 871 | } |
| 872 | optional State state = 2; |
| 873 | } |
| 874 | |
| 875 | /** |
| 876 | * Logs when the camera state changes. |
| 877 | * |
| 878 | * Logged from: |
Bookatz | 235343d | 2018-03-26 13:03:50 -0700 | [diff] [blame] | 879 | * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 880 | */ |
| 881 | message CameraStateChanged { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 882 | repeated AttributionNode attribution_node = 1; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 883 | |
| 884 | enum State { |
| 885 | OFF = 0; |
| 886 | ON = 1; |
Bookatz | 235343d | 2018-03-26 13:03:50 -0700 | [diff] [blame] | 887 | // RESET indicates all camera stopped. Used when it (re)starts (e.g. after it crashes). |
| 888 | RESET = 2; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 889 | } |
| 890 | optional State state = 2; |
| 891 | } |
| 892 | |
| 893 | /** |
| 894 | * 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] | 895 | * |
| 896 | * Logged from: |
| 897 | * TODO |
| 898 | */ |
Bookatz | d674624 | 2017-10-24 18:39:35 -0700 | [diff] [blame] | 899 | message WakelockStateChanged { |
tsaichristine | ed61564 | 2020-01-02 12:53:41 -0800 | [diff] [blame] | 900 | repeated AttributionNode attribution_node = 1 |
| 901 | [(state_field_option).option = PRIMARY_FIELD_FIRST_UID]; |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 902 | |
Bookatz | 1a1b046 | 2018-01-12 11:47:03 -0800 | [diff] [blame] | 903 | // The type (level) of the wakelock; e.g. a partial wakelock or a full wakelock. |
| 904 | // From frameworks/base/core/proto/android/os/enums.proto. |
tsaichristine | ed61564 | 2020-01-02 12:53:41 -0800 | [diff] [blame] | 905 | optional android.os.WakeLockLevelEnum type = 2 [(state_field_option).option = PRIMARY]; |
| 906 | ; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 907 | |
| 908 | // The wakelock tag (Called tag in the Java API, sometimes name elsewhere). |
tsaichristine | ed61564 | 2020-01-02 12:53:41 -0800 | [diff] [blame] | 909 | optional string tag = 3 [(state_field_option).option = PRIMARY]; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 910 | |
| 911 | enum State { |
Yangster-mac | cfdf3a4 | 2017-12-06 13:42:38 -0800 | [diff] [blame] | 912 | RELEASE = 0; |
| 913 | ACQUIRE = 1; |
| 914 | CHANGE_RELEASE = 2; |
| 915 | CHANGE_ACQUIRE = 3; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 916 | } |
tsaichristine | ed61564 | 2020-01-02 12:53:41 -0800 | [diff] [blame] | 917 | optional State state = 4 [(state_field_option).option = EXCLUSIVE]; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 918 | } |
| 919 | |
| 920 | /** |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 921 | * Logs when a partial wakelock is considered 'long' (over 1 min). |
| 922 | * |
| 923 | * Logged from: |
| 924 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
| 925 | */ |
| 926 | message LongPartialWakelockStateChanged { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 927 | repeated AttributionNode attribution_node = 1; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 928 | |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 929 | // The wakelock tag (Called tag in the Java API, sometimes name elsewhere). |
| 930 | optional string tag = 2; |
| 931 | |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 932 | // TODO: I have no idea what this is. |
| 933 | optional string history_tag = 3; |
| 934 | |
| 935 | enum State { |
| 936 | OFF = 0; |
| 937 | ON = 1; |
| 938 | } |
| 939 | optional State state = 4; |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 940 | } |
| 941 | |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 942 | /** |
Bookatz | a66083f | 2018-09-20 17:24:00 -0700 | [diff] [blame] | 943 | * Logs when the device is interactive, according to the PowerManager Notifier. |
| 944 | * |
| 945 | * Logged from: |
| 946 | * frameworks/base/services/core/java/com/android/server/power/Notifier.java |
| 947 | */ |
| 948 | message InteractiveStateChanged { |
| 949 | enum State { |
| 950 | OFF = 0; |
| 951 | ON = 1; |
| 952 | } |
| 953 | optional State state = 1; |
| 954 | } |
| 955 | |
| 956 | /** |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 957 | * Logs Battery Saver state change. |
| 958 | * |
| 959 | * Logged from: |
| 960 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
| 961 | */ |
| 962 | message BatterySaverModeStateChanged { |
| 963 | enum State { |
| 964 | OFF = 0; |
| 965 | ON = 1; |
| 966 | } |
| 967 | optional State state = 1; |
| 968 | } |
| 969 | |
| 970 | /** |
| 971 | * Logs Doze mode state change. |
| 972 | * |
| 973 | * Logged from: |
Bookatz | ddccf0a | 2017-11-28 16:48:14 -0800 | [diff] [blame] | 974 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 975 | */ |
| 976 | message DeviceIdleModeStateChanged { |
Bookatz | 8bdae8d | 2018-01-16 11:24:30 -0800 | [diff] [blame] | 977 | optional android.server.DeviceIdleModeEnum state = 1; |
Bookatz | ddccf0a | 2017-11-28 16:48:14 -0800 | [diff] [blame] | 978 | } |
| 979 | |
| 980 | |
| 981 | /** |
| 982 | * Logs state change of Doze mode including maintenance windows. |
| 983 | * |
| 984 | * Logged from: |
| 985 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
| 986 | */ |
| 987 | message DeviceIdlingModeStateChanged { |
Bookatz | 8bdae8d | 2018-01-16 11:24:30 -0800 | [diff] [blame] | 988 | optional android.server.DeviceIdleModeEnum state = 1; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 989 | } |
| 990 | |
| 991 | /** |
| 992 | * Logs screen brightness level. |
| 993 | * |
| 994 | * Logged from: |
| 995 | * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java |
| 996 | */ |
| 997 | message ScreenBrightnessChanged { |
| 998 | // Screen brightness level. Should be in [-1, 255] according to PowerManager.java. |
| 999 | optional int32 level = 1; |
Bookatz | 8c6571b | 2017-10-24 15:04:41 -0700 | [diff] [blame] | 1000 | } |
| 1001 | |
| 1002 | /** |
| 1003 | * Logs battery level (percent full, from 0 to 100). |
| 1004 | * |
| 1005 | * Logged from: |
David Chen | c28b2bb | 2017-10-24 12:52:52 -0700 | [diff] [blame] | 1006 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
Bookatz | 8c6571b | 2017-10-24 15:04:41 -0700 | [diff] [blame] | 1007 | */ |
| 1008 | message BatteryLevelChanged { |
| 1009 | // Battery level. Should be in [0, 100]. |
| 1010 | optional int32 battery_level = 1; |
| 1011 | } |
| 1012 | |
| 1013 | /** |
| 1014 | * Logs change in charging status of the device. |
| 1015 | * |
| 1016 | * Logged from: |
David Chen | c28b2bb | 2017-10-24 12:52:52 -0700 | [diff] [blame] | 1017 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
Bookatz | 8c6571b | 2017-10-24 15:04:41 -0700 | [diff] [blame] | 1018 | */ |
| 1019 | message ChargingStateChanged { |
Bookatz | 1a1b046 | 2018-01-12 11:47:03 -0800 | [diff] [blame] | 1020 | // State of the battery, from frameworks/base/core/proto/android/os/enums.proto. |
| 1021 | optional android.os.BatteryStatusEnum state = 1; |
Bookatz | 8c6571b | 2017-10-24 15:04:41 -0700 | [diff] [blame] | 1022 | } |
| 1023 | |
| 1024 | /** |
| 1025 | * Logs whether the device is plugged in, and what power source it is using. |
| 1026 | * |
| 1027 | * Logged from: |
David Chen | c28b2bb | 2017-10-24 12:52:52 -0700 | [diff] [blame] | 1028 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
Bookatz | 8c6571b | 2017-10-24 15:04:41 -0700 | [diff] [blame] | 1029 | */ |
| 1030 | message PluggedStateChanged { |
Bookatz | 1a1b046 | 2018-01-12 11:47:03 -0800 | [diff] [blame] | 1031 | // Whether the device is plugged in, from frameworks/base/core/proto/android/os/enums.proto. |
| 1032 | optional android.os.BatteryPluggedStateEnum state = 1; |
Bookatz | 8c6571b | 2017-10-24 15:04:41 -0700 | [diff] [blame] | 1033 | } |
| 1034 | |
Bookatz | 8c6571b | 2017-10-24 15:04:41 -0700 | [diff] [blame] | 1035 | /** |
| 1036 | * Logs when an app's wakeup alarm fires. |
| 1037 | * |
| 1038 | * Logged from: |
David Chen | c28b2bb | 2017-10-24 12:52:52 -0700 | [diff] [blame] | 1039 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
Bookatz | 8c6571b | 2017-10-24 15:04:41 -0700 | [diff] [blame] | 1040 | */ |
| 1041 | message WakeupAlarmOccurred { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 1042 | repeated AttributionNode attribution_node = 1; |
Bookatz | ddccf0a | 2017-11-28 16:48:14 -0800 | [diff] [blame] | 1043 | |
| 1044 | // Name of the wakeup alarm. |
| 1045 | optional string tag = 2; |
Bookatz | caf2293e | 2018-09-23 13:07:43 -0700 | [diff] [blame] | 1046 | |
| 1047 | // Name of source package (for historical reasons, since BatteryStats tracked it). |
| 1048 | optional string package_name = 3; |
Ben Murdoch | 3389f152 | 2019-05-21 15:05:34 +0100 | [diff] [blame] | 1049 | |
| 1050 | // These enum values match the STANDBY_BUCKET_XXX constants defined in UsageStatsManager.java. |
| 1051 | enum Bucket { |
| 1052 | UNKNOWN = 0; |
| 1053 | EXEMPTED = 5; |
| 1054 | ACTIVE = 10; |
| 1055 | WORKING_SET = 20; |
| 1056 | FREQUENT = 30; |
| 1057 | RARE = 40; |
| 1058 | NEVER = 50; |
| 1059 | } |
| 1060 | // The App Standby bucket of the app that scheduled the alarm at the time the alarm fired. |
| 1061 | optional Bucket app_standby_bucket = 4; |
Bookatz | ddccf0a | 2017-11-28 16:48:14 -0800 | [diff] [blame] | 1062 | } |
| 1063 | |
| 1064 | /** |
| 1065 | * Logs when an an app causes the mobile radio to change state. |
| 1066 | * Changing from LOW to MEDIUM or HIGH can be considered the app waking the mobile radio. |
| 1067 | * |
| 1068 | * Logged from: |
Bookatz | 0b028b1 | 2018-05-31 16:51:17 -0700 | [diff] [blame] | 1069 | * frameworks/base/services/core/java/com/android/server/NetworkManagementService.java |
Bookatz | ddccf0a | 2017-11-28 16:48:14 -0800 | [diff] [blame] | 1070 | */ |
| 1071 | message MobileRadioPowerStateChanged { |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 1072 | repeated AttributionNode attribution_node = 1; |
Bookatz | ddccf0a | 2017-11-28 16:48:14 -0800 | [diff] [blame] | 1073 | |
Bookatz | 1a1b046 | 2018-01-12 11:47:03 -0800 | [diff] [blame] | 1074 | // Power state, from frameworks/base/core/proto/android/telephony/enums.proto. |
| 1075 | optional android.telephony.DataConnectionPowerStateEnum state = 2; |
Bookatz | ddccf0a | 2017-11-28 16:48:14 -0800 | [diff] [blame] | 1076 | } |
| 1077 | |
| 1078 | /** |
| 1079 | * Logs when an an app causes the wifi radio to change state. |
| 1080 | * Changing from LOW to MEDIUM or HIGH can be considered the app waking the wifi radio. |
| 1081 | * |
| 1082 | * Logged from: |
Bookatz | 0b028b1 | 2018-05-31 16:51:17 -0700 | [diff] [blame] | 1083 | * frameworks/base/services/core/java/com/android/server/NetworkManagementService.java |
Bookatz | ddccf0a | 2017-11-28 16:48:14 -0800 | [diff] [blame] | 1084 | */ |
| 1085 | message WifiRadioPowerStateChanged { |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 1086 | repeated AttributionNode attribution_node = 1; |
Bookatz | ddccf0a | 2017-11-28 16:48:14 -0800 | [diff] [blame] | 1087 | |
Bookatz | 1a1b046 | 2018-01-12 11:47:03 -0800 | [diff] [blame] | 1088 | // Power state, from frameworks/base/core/proto/android/telephony/enums.proto. |
| 1089 | optional android.telephony.DataConnectionPowerStateEnum state = 2; |
Bookatz | 8c6571b | 2017-10-24 15:04:41 -0700 | [diff] [blame] | 1090 | } |
| 1091 | |
| 1092 | /** |
| 1093 | * Logs kernel wakeup reasons and aborts. |
| 1094 | * |
| 1095 | * Logged from: |
Bookatz | 56585ca | 2018-09-07 11:38:45 -0700 | [diff] [blame] | 1096 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
Bookatz | 8c6571b | 2017-10-24 15:04:41 -0700 | [diff] [blame] | 1097 | */ |
| 1098 | message KernelWakeupReported { |
| 1099 | // Name of the kernel wakeup reason (or abort). |
| 1100 | optional string wakeup_reason_name = 1; |
| 1101 | |
| 1102 | // Duration (in microseconds) for the wake-up interrupt to be serviced. |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 1103 | optional int64 duration_micros = 2; |
Bookatz | e588524 | 2017-10-24 20:10:31 -0700 | [diff] [blame] | 1104 | } |
| 1105 | |
| 1106 | /** |
Bookatz | da1798c | 2018-12-13 14:16:00 -0800 | [diff] [blame] | 1107 | * Logs when Wifi is toggled on/off. |
Bookatz | a0a1f8a | 2018-12-17 12:28:32 -0800 | [diff] [blame] | 1108 | * 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] | 1109 | * |
| 1110 | * Logged from: |
| 1111 | * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java |
| 1112 | */ |
| 1113 | message WifiEnabledStateChanged { |
| 1114 | enum State { |
| 1115 | OFF = 0; |
| 1116 | ON = 1; |
| 1117 | } |
| 1118 | optional State state = 1; |
| 1119 | } |
| 1120 | |
| 1121 | /** |
| 1122 | * 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] | 1123 | * TODO: Include support for Hotspot, perhaps by using an extra field to denote 'mode'. |
| 1124 | * Note that Wifi Scanning is monitored separately in WifiScanStateChanged. |
Bookatz | da1798c | 2018-12-13 14:16:00 -0800 | [diff] [blame] | 1125 | * |
| 1126 | * Logged from: |
| 1127 | * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java |
| 1128 | */ |
| 1129 | message WifiRunningStateChanged { |
| 1130 | repeated AttributionNode attribution_node = 1; |
| 1131 | |
| 1132 | enum State { |
| 1133 | OFF = 0; |
| 1134 | ON = 1; |
| 1135 | } |
| 1136 | optional State state = 2; |
| 1137 | } |
| 1138 | |
| 1139 | /** |
Bookatz | e588524 | 2017-10-24 20:10:31 -0700 | [diff] [blame] | 1140 | * Logs wifi locks held by an app. |
| 1141 | * |
| 1142 | * Logged from: |
David Chen | c28b2bb | 2017-10-24 12:52:52 -0700 | [diff] [blame] | 1143 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
Bookatz | e588524 | 2017-10-24 20:10:31 -0700 | [diff] [blame] | 1144 | */ |
| 1145 | message WifiLockStateChanged { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 1146 | repeated AttributionNode attribution_node = 1; |
Bookatz | e588524 | 2017-10-24 20:10:31 -0700 | [diff] [blame] | 1147 | |
| 1148 | enum State { |
| 1149 | OFF = 0; |
| 1150 | ON = 1; |
| 1151 | } |
| 1152 | optional State state = 2; |
Bookatz | 11257ca | 2018-12-05 18:22:39 -0800 | [diff] [blame] | 1153 | |
| 1154 | // WifiLock type, from frameworks/base/core/proto/android/wifi/enums.proto. |
| 1155 | optional android.net.wifi.WifiModeEnum mode = 3; |
Bookatz | e588524 | 2017-10-24 20:10:31 -0700 | [diff] [blame] | 1156 | } |
| 1157 | |
| 1158 | /** |
| 1159 | * Logs wifi signal strength changes. |
| 1160 | * |
| 1161 | * Logged from: |
Bookatz | 819ea83 | 2018-11-28 16:53:31 -0800 | [diff] [blame] | 1162 | * frameworks/opt/net/wifi/service/java/com/android/server/wifi/ClientModeImpl.java |
Bookatz | e588524 | 2017-10-24 20:10:31 -0700 | [diff] [blame] | 1163 | */ |
| 1164 | message WifiSignalStrengthChanged { |
Bookatz | 1a1b046 | 2018-01-12 11:47:03 -0800 | [diff] [blame] | 1165 | // Signal strength, from frameworks/base/core/proto/android/telephony/enums.proto. |
| 1166 | optional android.telephony.SignalStrengthEnum signal_strength = 1; |
Bookatz | e588524 | 2017-10-24 20:10:31 -0700 | [diff] [blame] | 1167 | } |
| 1168 | |
| 1169 | /** |
| 1170 | * Logs wifi scans performed by an app. |
| 1171 | * |
| 1172 | * Logged from: |
Bookatz | 819ea83 | 2018-11-28 16:53:31 -0800 | [diff] [blame] | 1173 | * frameworks/opt/net/wifi/service/java/com/android/server/wifi/scanner/WifiScanningServiceImpl.java |
Bookatz | e588524 | 2017-10-24 20:10:31 -0700 | [diff] [blame] | 1174 | */ |
| 1175 | message WifiScanStateChanged { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 1176 | repeated AttributionNode attribution_node = 1; |
Bookatz | e588524 | 2017-10-24 20:10:31 -0700 | [diff] [blame] | 1177 | |
| 1178 | enum State { |
| 1179 | OFF = 0; |
| 1180 | ON = 1; |
| 1181 | } |
| 1182 | optional State state = 2; |
| 1183 | } |
| 1184 | |
| 1185 | /** |
Tej Singh | 4503e10 | 2018-01-04 14:35:01 -0800 | [diff] [blame] | 1186 | * Logs wifi multicast locks held by an app |
| 1187 | * |
| 1188 | * Logged from: |
Bookatz | 819ea83 | 2018-11-28 16:53:31 -0800 | [diff] [blame] | 1189 | * frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiMulticastLockManager.java |
Tej Singh | 4503e10 | 2018-01-04 14:35:01 -0800 | [diff] [blame] | 1190 | */ |
| 1191 | message WifiMulticastLockStateChanged { |
| 1192 | repeated AttributionNode attribution_node = 1; |
| 1193 | |
| 1194 | enum State { |
| 1195 | OFF = 0; |
| 1196 | ON = 1; |
| 1197 | } |
| 1198 | optional State state = 2; |
Bookatz | 819ea83 | 2018-11-28 16:53:31 -0800 | [diff] [blame] | 1199 | |
| 1200 | optional string tag = 3; |
Tej Singh | 4503e10 | 2018-01-04 14:35:01 -0800 | [diff] [blame] | 1201 | } |
| 1202 | |
| 1203 | /** |
Tej Singh | 1ea4289 | 2018-01-19 09:27:00 -0800 | [diff] [blame] | 1204 | * Logs shutdown reason and duration on next boot. |
| 1205 | * |
| 1206 | * Logged from: |
| 1207 | * frameworks/base/core/java/com/android/server/BootReceiver.java |
| 1208 | */ |
| 1209 | message ShutdownSequenceReported { |
| 1210 | // True if shutdown is for a reboot. Default: false if we do not know. |
| 1211 | optional bool reboot = 1; |
| 1212 | |
| 1213 | // Reason for shutdown. Eg: userrequested. Default: "<EMPTY>". |
| 1214 | optional string reason = 2; |
| 1215 | |
| 1216 | // Beginning of shutdown time in ms using wall clock time since unix epoch. |
| 1217 | // Default: 0 if no start time received. |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 1218 | optional int64 start_time_millis = 3; |
Tej Singh | 1ea4289 | 2018-01-19 09:27:00 -0800 | [diff] [blame] | 1219 | |
| 1220 | // Duration of shutdown in ms. Default: 0 if no duration received. |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 1221 | optional int64 duration_millis = 4; |
Tej Singh | 1ea4289 | 2018-01-19 09:27:00 -0800 | [diff] [blame] | 1222 | } |
| 1223 | |
Tej Singh | 6483ea4 | 2018-01-25 17:45:49 -0800 | [diff] [blame] | 1224 | |
| 1225 | /** |
| 1226 | * Logs boot reason and duration. |
| 1227 | * |
| 1228 | * Logged from: |
| 1229 | * system/core/bootstat/bootstat.cpp |
| 1230 | */ |
| 1231 | message BootSequenceReported { |
| 1232 | // Reason for bootloader boot. Eg. reboot. See bootstat.cpp for larger list |
| 1233 | // Default: "<EMPTY>" if not available. |
| 1234 | optional string bootloader_reason = 1; |
| 1235 | |
| 1236 | // Reason for system boot. Eg. bootloader, reboot,userrequested |
| 1237 | // Default: "<EMPTY>" if not available. |
| 1238 | optional string system_reason = 2; |
| 1239 | |
| 1240 | // 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] | 1241 | optional int64 end_time_millis = 3; |
Tej Singh | 6483ea4 | 2018-01-25 17:45:49 -0800 | [diff] [blame] | 1242 | |
| 1243 | // Total boot duration in ms. |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 1244 | optional int64 total_duration_millis = 4; |
Tej Singh | 6483ea4 | 2018-01-25 17:45:49 -0800 | [diff] [blame] | 1245 | |
| 1246 | // Bootloader duration in ms. |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 1247 | optional int64 bootloader_duration_millis = 5; |
Tej Singh | 6483ea4 | 2018-01-25 17:45:49 -0800 | [diff] [blame] | 1248 | |
| 1249 | // Time since last boot in ms. Default: 0 if not available. |
| 1250 | optional int64 time_since_last_boot = 6; |
| 1251 | } |
| 1252 | |
Tej Singh | c477d9c | 2018-02-05 18:31:39 -0800 | [diff] [blame] | 1253 | |
| 1254 | /** |
| 1255 | * Logs call state and disconnect cause (if applicable). |
| 1256 | * |
| 1257 | * Logged from: |
| 1258 | * packages/services/Telecomm/src/com/android/server/telecom/Call.java |
| 1259 | */ |
| 1260 | message CallStateChanged { |
| 1261 | // The state of the call. Eg. DIALING, ACTIVE, ON_HOLD, DISCONNECTED. |
| 1262 | // From frameworks/base/core/proto/android/telecomm/enums.proto. |
| 1263 | optional android.telecom.CallStateEnum call_state = 1; |
| 1264 | |
| 1265 | // The reason the call disconnected. Eg. ERROR, MISSED, REJECTED, BUSY. |
| 1266 | // This value is only applicable when the call_state is DISCONNECTED, and |
| 1267 | // should always be UNKNOWN if the call_state is not DISCONNECTED. |
| 1268 | // From frameworks/base/core/proto/android/telecomm/enums.proto. |
| 1269 | optional android.telecom.DisconnectCauseEnum disconnect_cause = 2; |
| 1270 | |
| 1271 | // True if the call is self-managed, which are apps that use the |
| 1272 | // telecom infrastructure to make their own calls. |
| 1273 | optional bool self_managed = 3; |
| 1274 | |
| 1275 | // True if call is external. External calls are calls on connected Wear |
| 1276 | // devices but show up in Telecom so the user can pull them onto the device. |
| 1277 | optional bool external_call = 4; |
| 1278 | } |
| 1279 | |
Tej Singh | 1ea4289 | 2018-01-19 09:27:00 -0800 | [diff] [blame] | 1280 | /** |
Tej Singh | dd7bd35 | 2018-02-09 19:33:15 -0800 | [diff] [blame] | 1281 | * Logs keyguard state. The keyguard is the lock screen. |
| 1282 | * |
| 1283 | * Logged from: |
| 1284 | * frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java |
| 1285 | */ |
| 1286 | message KeyguardStateChanged { |
| 1287 | enum State { |
| 1288 | UNKNOWN = 0; |
| 1289 | // The keyguard is hidden when the phone is unlocked. |
| 1290 | HIDDEN = 1; |
| 1291 | // The keyguard is shown when the phone is locked (screen turns off). |
| 1292 | SHOWN= 2; |
| 1293 | // The keyguard is occluded when something is overlaying the keyguard. |
| 1294 | // Eg. Opening the camera while on the lock screen. |
| 1295 | OCCLUDED = 3; |
| 1296 | } |
| 1297 | optional State state = 1; |
| 1298 | } |
| 1299 | |
| 1300 | /** |
| 1301 | * Logs keyguard bouncer state. The bouncer is a part of the keyguard, and |
| 1302 | * prompts the user to enter a password (pattern, pin, etc). |
| 1303 | * |
| 1304 | * Logged from: |
| 1305 | * frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBouncer.java |
| 1306 | */ |
| 1307 | |
| 1308 | message KeyguardBouncerStateChanged { |
| 1309 | enum State { |
| 1310 | UNKNOWN = 0; |
| 1311 | // Bouncer is hidden, either as a result of successfully entering the |
| 1312 | // password, screen timing out, or user going back to lock screen. |
| 1313 | HIDDEN = 1; |
| 1314 | // This is when the user is being prompted to enter the password. |
| 1315 | SHOWN = 2; |
| 1316 | } |
| 1317 | optional State state = 1; |
| 1318 | } |
| 1319 | |
| 1320 | /** |
| 1321 | * Logs the result of entering a password into the keyguard bouncer. |
| 1322 | * |
| 1323 | * Logged from: |
| 1324 | * frameworks/base/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainer.java |
| 1325 | */ |
| 1326 | message KeyguardBouncerPasswordEntered { |
| 1327 | enum BouncerResult { |
| 1328 | UNKNOWN = 0; |
| 1329 | // The password entered was incorrect. |
| 1330 | FAILURE = 1; |
| 1331 | // The password entered was correct. |
| 1332 | SUCCESS = 2; |
| 1333 | } |
| 1334 | optional BouncerResult result = 1; |
| 1335 | } |
| 1336 | |
Tej Singh | a883b37 | 2018-02-15 11:30:01 -0800 | [diff] [blame] | 1337 | /* |
| 1338 | * Logs changes to the configuration of the device. The configuration is defined |
| 1339 | * in frameworks/base/core/java/android/content/res/Configuration.java |
| 1340 | * More documentation is at https://d.android.com/reference/android/content/res/Configuration.html |
| 1341 | * Please go there to interpret the possible values each field can be. |
| 1342 | * |
| 1343 | * Logged from: |
| 1344 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
| 1345 | */ |
| 1346 | message ResourceConfigurationChanged { |
| 1347 | // Bit mask of color capabilities of the screen. |
| 1348 | // Contains information about the color gamut and hdr mode of the screen. |
| 1349 | // See: https://d.android.com/reference/android/content/res/Configuration.html#colorMode |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 1350 | optional int32 color_mode = 1; |
Tej Singh | a883b37 | 2018-02-15 11:30:01 -0800 | [diff] [blame] | 1351 | |
| 1352 | // The target screen density being rendered to. |
| 1353 | // See: https://d.android.com/reference/android/content/res/Configuration.html#densityDpi |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 1354 | optional int32 density_dpi = 2; |
Tej Singh | a883b37 | 2018-02-15 11:30:01 -0800 | [diff] [blame] | 1355 | |
| 1356 | // Current user preference for the scaling factor for fonts, |
| 1357 | // relative to the base density scaling. |
| 1358 | // See: https://d.android.com/reference/android/content/res/Configuration.html#fontScale |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 1359 | optional float font_scale = 3; |
Tej Singh | a883b37 | 2018-02-15 11:30:01 -0800 | [diff] [blame] | 1360 | |
| 1361 | // Flag indicating whether the hard keyboard is hidden. |
| 1362 | // See: https://d.android.com/reference/android/content/res/Configuration.html#hardKeyboardHidden |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 1363 | optional int32 hard_keyboard_hidden = 4; |
Tej Singh | a883b37 | 2018-02-15 11:30:01 -0800 | [diff] [blame] | 1364 | |
| 1365 | // The type of keyboard attached to the device. |
| 1366 | // See: https://d.android.com/reference/android/content/res/Configuration.html#keyboard |
| 1367 | optional int32 keyboard = 5; |
| 1368 | |
| 1369 | // Flag indicating whether any keyboard is available. Takes soft keyboards into account. |
| 1370 | // See: https://d.android.com/reference/android/content/res/Configuration.html#keyboardHidden |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 1371 | optional int32 keyboard_hidden = 6; |
Tej Singh | a883b37 | 2018-02-15 11:30:01 -0800 | [diff] [blame] | 1372 | |
| 1373 | // IMSI MCC (Mobile Country Code), corresponding to mcc resource qualifier. |
| 1374 | // 0 if undefined. |
| 1375 | // See: https://d.android.com/reference/android/content/res/Configuration.html#mcc |
| 1376 | optional int32 mcc = 7; |
| 1377 | |
| 1378 | // IMSI MNC (Mobile Network Code), corresponding to mnc resource qualifier. |
| 1379 | // 0 if undefined. Note: the actual MNC may be 0, to check for this use the |
| 1380 | // MNC_ZERO symbol defined in Configuration.java. |
| 1381 | // See: https://d.android.com/reference/android/content/res/Configuration.html#mnc |
| 1382 | optional int32 mnc = 8; |
| 1383 | |
| 1384 | // The kind of navigation available on the device. |
| 1385 | // See: https://developer.android.com/reference/android/content/res/Configuration.html#navigation |
| 1386 | optional int32 navigation = 9; |
| 1387 | |
| 1388 | // Flag indicating whether the navigation is available. |
| 1389 | // See: https://d.android.com/reference/android/content/res/Configuration.html#navigationHidden |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 1390 | optional int32 navigation_hidden = 10; |
Tej Singh | a883b37 | 2018-02-15 11:30:01 -0800 | [diff] [blame] | 1391 | |
| 1392 | // Overall orientation of the screen. |
| 1393 | // See: https://d.android.com/reference/android/content/res/Configuration.html#orientation |
| 1394 | optional int32 orientation = 11; |
| 1395 | |
| 1396 | // The current height of the available screen space, in dp units. |
| 1397 | // See: https://d.android.com/reference/android/content/res/Configuration.html#screenHeightDp |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 1398 | optional int32 screen_height_dp = 12; |
Tej Singh | a883b37 | 2018-02-15 11:30:01 -0800 | [diff] [blame] | 1399 | |
| 1400 | // Bit mask of overall layout of the screen. |
| 1401 | // Contains information about screen size, whether the screen is wider/taller |
| 1402 | // than normal, whether the screen layout is right-tl-left or left-to-right, |
| 1403 | // and whether the screen has a rounded shape. |
| 1404 | // See: https://d.android.com/reference/android/content/res/Configuration.html#screenLayout |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 1405 | optional int32 screen_layout = 13; |
Tej Singh | a883b37 | 2018-02-15 11:30:01 -0800 | [diff] [blame] | 1406 | |
| 1407 | // Current width of the available screen space, in dp units. |
| 1408 | // See: https://d.android.com/reference/android/content/res/Configuration.html#screenWidthDp |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 1409 | optional int32 screen_width_dp = 14; |
Tej Singh | a883b37 | 2018-02-15 11:30:01 -0800 | [diff] [blame] | 1410 | |
| 1411 | // The smallest screen size an application will see in normal operation. |
| 1412 | // This is the smallest value of both screenWidthDp and screenHeightDp |
| 1413 | // in portrait and landscape. |
| 1414 | // See: https://d.android.com/reference/android/content/res/Configuration.html#smallestScreenWidthDp |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 1415 | optional int32 smallest_screen_width_dp = 15; |
Tej Singh | a883b37 | 2018-02-15 11:30:01 -0800 | [diff] [blame] | 1416 | |
| 1417 | // The type of touch screen attached to the device. |
| 1418 | // See: https://d.android.com/reference/android/content/res/Configuration.html#touchscreen |
| 1419 | optional int32 touchscreen = 16; |
| 1420 | |
| 1421 | // Bit mask of the ui mode. |
| 1422 | // Contains information about the overall ui mode of the device. |
| 1423 | // Eg: NORMAL, DESK, CAR, TELEVISION, WATCH, VR_HEADSET |
| 1424 | // Also contains information about whether the device is in night mode. |
| 1425 | // See: https://d.android.com/reference/android/content/res/Configuration.html#uiMode |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 1426 | optional int32 ui_mode = 17; |
Tej Singh | a883b37 | 2018-02-15 11:30:01 -0800 | [diff] [blame] | 1427 | } |
| 1428 | |
Tej Singh | eee317b | 2018-03-07 19:28:05 -0800 | [diff] [blame] | 1429 | |
| 1430 | /** |
| 1431 | * Logs changes in the connection state of the mobile radio. |
| 1432 | * |
| 1433 | * Logged from: |
| 1434 | * frameworks/opt/telephony/src/java/com/android/internal/telephony/dataconnection/DataConnection.java |
| 1435 | */ |
| 1436 | message MobileConnectionStateChanged { |
| 1437 | // States are from the state machine DataConnection.java. |
| 1438 | enum State { |
| 1439 | UNKNOWN = 0; |
| 1440 | // The connection is inactive, or disconnected. |
| 1441 | INACTIVE = 1; |
| 1442 | // The connection is being activated, or connecting. |
| 1443 | ACTIVATING = 2; |
| 1444 | // The connection is active, or connected. |
| 1445 | ACTIVE = 3; |
| 1446 | // The connection is disconnecting. |
| 1447 | DISCONNECTING = 4; |
| 1448 | // The connection is disconnecting after creating a connection. |
| 1449 | DISCONNECTION_ERROR_CREATING_CONNECTION = 5; |
| 1450 | } |
| 1451 | optional State state = 1; |
| 1452 | // For multi-sim phones, this distinguishes between the sim cards. |
| 1453 | optional int32 sim_slot_index = 2; |
| 1454 | // Used to identify the connection. Starts at 0 and increments by 1 for |
| 1455 | // every new network created. Resets whenever the device reboots. |
| 1456 | optional int32 data_connection_id = 3; |
| 1457 | // A bitmask for the capabilities of this connection. |
| 1458 | // Eg. DEFAULT (internet), MMS, SUPL, DUN, IMS. |
| 1459 | // Default value (if we have no information): 0 |
| 1460 | optional int64 capabilities = 4; |
| 1461 | // If this connection has internet. |
| 1462 | // This just checks if the DEFAULT bit of capabilities is set. |
| 1463 | optional bool has_internet = 5; |
| 1464 | } |
| 1465 | |
| 1466 | /** |
| 1467 | * Logs changes in mobile radio technology. eg: LTE, EDGE, CDMA. |
| 1468 | * |
| 1469 | * Logged from: |
| 1470 | * frameworks/opt/telephony/src/java/com/android/internal/telephony/ServiceStateTracker.java |
| 1471 | */ |
| 1472 | message MobileRadioTechnologyChanged { |
| 1473 | optional android.telephony.NetworkTypeEnum state = 1; |
| 1474 | // For multi-sim phones, this distinguishes between the sim cards. |
| 1475 | optional int32 sim_slot_index = 2; |
| 1476 | } |
| 1477 | |
Andrew Chant | b56388b | 2018-03-22 21:07:33 -0700 | [diff] [blame] | 1478 | /** |
| 1479 | * Logs the VID and PID of any connected USB devices. |
| 1480 | * |
| 1481 | * Notes if any Audio, HID (input buttons/mouse/keyboard), or Storage interfaces are present. |
| 1482 | * |
| 1483 | * Logged by Vendor. |
| 1484 | */ |
| 1485 | message UsbDeviceAttached { |
| 1486 | optional int32 vid = 1; |
| 1487 | optional int32 pid = 2; |
| 1488 | optional bool has_audio = 3; |
| 1489 | optional bool has_hid = 4; |
| 1490 | optional bool has_storage = 5; |
Badhri Jagan Sridharan | 5ec629f | 2018-11-16 15:39:22 -0800 | [diff] [blame] | 1491 | enum State { |
| 1492 | STATE_DISCONNECTED = 0; |
| 1493 | STATE_CONNECTED = 1; |
| 1494 | } |
| 1495 | optional State state = 6; |
Badhri Jagan Sridharan | c2c54a2 | 2018-12-14 14:41:26 -0800 | [diff] [blame] | 1496 | optional int64 last_connect_duration_millis = 7; |
Andrew Chant | b56388b | 2018-03-22 21:07:33 -0700 | [diff] [blame] | 1497 | } |
| 1498 | |
Tej Singh | eee317b | 2018-03-07 19:28:05 -0800 | [diff] [blame] | 1499 | |
Tej Singh | dd7bd35 | 2018-02-09 19:33:15 -0800 | [diff] [blame] | 1500 | /** |
Tej Singh | 5d991e1 | 2018-03-09 19:48:11 -0800 | [diff] [blame] | 1501 | * Logs when Bluetooth is enabled and disabled. |
| 1502 | * |
| 1503 | * Logged from: |
| 1504 | * services/core/java/com/android/server/BluetoothManagerService.java |
| 1505 | */ |
| 1506 | message BluetoothEnabledStateChanged { |
| 1507 | repeated AttributionNode attribution_node = 1; |
| 1508 | // Whether or not bluetooth is enabled on the device. |
| 1509 | enum State { |
| 1510 | UNKNOWN = 0; |
| 1511 | ENABLED = 1; |
| 1512 | DISABLED = 2; |
| 1513 | } |
| 1514 | optional State state = 2; |
| 1515 | // The reason for being enabled/disabled. |
| 1516 | // Eg. Airplane mode, crash, application request. |
| 1517 | optional android.bluetooth.EnableDisableReasonEnum reason = 3; |
| 1518 | // 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] | 1519 | optional string pkg_name = 4; |
Tej Singh | 5d991e1 | 2018-03-09 19:48:11 -0800 | [diff] [blame] | 1520 | } |
| 1521 | |
| 1522 | /** |
Jack He | d9837c8 | 2019-01-09 01:19:13 -0800 | [diff] [blame] | 1523 | * Logs when profiles on a Bluetooth device connects and disconnects. |
Tej Singh | 5d991e1 | 2018-03-09 19:48:11 -0800 | [diff] [blame] | 1524 | * |
| 1525 | * Logged from: |
Jack He | d9837c8 | 2019-01-09 01:19:13 -0800 | [diff] [blame] | 1526 | * packages/apps/Bluetooth/src/com/android/bluetooth/btservice/RemoteDevices.java |
| 1527 | * |
| 1528 | * Next Tag: 5 |
Tej Singh | 5d991e1 | 2018-03-09 19:48:11 -0800 | [diff] [blame] | 1529 | */ |
| 1530 | message BluetoothConnectionStateChanged { |
| 1531 | // The state of the connection. |
| 1532 | // Eg: CONNECTING, CONNECTED, DISCONNECTING, DISCONNECTED. |
| 1533 | optional android.bluetooth.ConnectionStateEnum state = 1; |
| 1534 | // An identifier that can be used to match connect and disconnect events. |
| 1535 | // Currently is last two bytes of a hash of a device level ID and |
| 1536 | // the mac address of the bluetooth device that is connected. |
Jack He | d9837c8 | 2019-01-09 01:19:13 -0800 | [diff] [blame] | 1537 | // Deprecated: use obfuscated_id instead, this one is always 0 for Q+ |
Jack He | ac33c99 | 2019-04-03 16:08:21 -0700 | [diff] [blame] | 1538 | optional int32 obfuscated_id = 2 [deprecated = true]; |
Tej Singh | 5d991e1 | 2018-03-09 19:48:11 -0800 | [diff] [blame] | 1539 | // The profile that is connected. Eg. GATT, A2DP, HEADSET. |
| 1540 | // From android.bluetooth.BluetoothAdapter.java |
Jack He | d9837c8 | 2019-01-09 01:19:13 -0800 | [diff] [blame] | 1541 | // Default: 0 when not used |
Tej Singh | 5d991e1 | 2018-03-09 19:48:11 -0800 | [diff] [blame] | 1542 | optional int32 bt_profile = 3; |
Jack He | d9837c8 | 2019-01-09 01:19:13 -0800 | [diff] [blame] | 1543 | // An identifier that can be used to match events for this device. |
| 1544 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 1545 | // Salt: Randomly generated 256 bit value |
| 1546 | // Hash algorithm: HMAC-SHA256 |
| 1547 | // Size: 32 byte |
| 1548 | // Default: null or empty if the device identifier is not known |
Jack He | ac33c99 | 2019-04-03 16:08:21 -0700 | [diff] [blame] | 1549 | 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] | 1550 | } |
| 1551 | |
| 1552 | /** |
| 1553 | * Logs when a Bluetooth device connects and disconnects over ACL |
| 1554 | * |
| 1555 | * Logged from: |
| 1556 | * packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterProperties.java |
| 1557 | * |
| 1558 | * Next Tag: 3 |
| 1559 | */ |
| 1560 | message BluetoothAclConnectionStateChanged { |
| 1561 | // An identifier that can be used to match events for this device. |
| 1562 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 1563 | // Salt: Randomly generated 256 bit value |
| 1564 | // Hash algorithm: HMAC-SHA256 |
| 1565 | // Size: 32 byte |
| 1566 | // Default: null or empty if the device identifier is not known |
| 1567 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 1568 | // The state of the connection. |
| 1569 | // Eg: CONNECTING, CONNECTED, DISCONNECTING, DISCONNECTED. |
| 1570 | optional android.bluetooth.ConnectionStateEnum state = 2; |
| 1571 | } |
| 1572 | |
| 1573 | /** |
| 1574 | * Logs when a Bluetooth device connects and disconnects over SCO |
| 1575 | * |
| 1576 | * Logged from: |
| 1577 | * packages/apps/Bluetooth/src/com/android/bluetooth/hfp/HeadsetStateMachine.java |
| 1578 | * packages/apps/Bluetooth/src/com/android/bluetooth/hfp/HeadsetClientStateMachine.java |
| 1579 | * |
| 1580 | * Next Tag: 4 |
| 1581 | */ |
| 1582 | message BluetoothScoConnectionStateChanged { |
| 1583 | // An identifier that can be used to match events for this device. |
| 1584 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 1585 | // Salt: Randomly generated 256 bit value |
| 1586 | // Hash algorithm: HMAC-SHA256 |
| 1587 | // Size: 32 byte |
| 1588 | // Default: null or empty if the device identifier is not known |
| 1589 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 1590 | // The state of the connection. |
| 1591 | // Eg: CONNECTING, CONNECTED, DISCONNECTING, DISCONNECTED. |
| 1592 | optional android.bluetooth.ConnectionStateEnum state = 2; |
| 1593 | // Codec used for this SCO connection |
| 1594 | // Default: UNKNOWN |
| 1595 | optional android.bluetooth.hfp.ScoCodec codec = 3; |
Tej Singh | 5d991e1 | 2018-03-09 19:48:11 -0800 | [diff] [blame] | 1596 | } |
| 1597 | |
Jack He | c27040a | 2019-01-09 20:54:41 -0800 | [diff] [blame] | 1598 | /** |
| 1599 | * Logged when active device of a profile changes |
| 1600 | * |
| 1601 | * Logged from: |
| 1602 | * packages/apps/Bluetooth/src/com/android/bluetooth/a2dp/A2dpService.java |
| 1603 | * packages/apps/Bluetooth/src/com/android/bluetooth/hfp/HeadsetService.java |
| 1604 | * packages/apps/Bluetooth/src/com/android/bluetooth/hearingaid/HearingAidService.java |
| 1605 | */ |
| 1606 | message BluetoothActiveDeviceChanged { |
| 1607 | // The profile whose active device has changed. Eg. A2DP, HEADSET, HEARING_AID |
| 1608 | // From android.bluetooth.BluetoothProfile |
| 1609 | optional int32 bt_profile = 1; |
| 1610 | // An identifier that can be used to match events for this new active device. |
| 1611 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 1612 | // Salt: Randomly generated 256 bit value |
| 1613 | // Hash algorithm: HMAC-SHA256 |
| 1614 | // Size: 32 byte |
| 1615 | // Default: null or empty if there is no active device for this profile |
| 1616 | optional bytes obfuscated_id = 2 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 1617 | } |
| 1618 | |
Jack He | ab86dbd2 | 2018-12-18 15:43:27 -0800 | [diff] [blame] | 1619 | // Logs when there is an event affecting Bluetooth device's link layer connection. |
| 1620 | // - This event is triggered when there is a related HCI command or event |
| 1621 | // - Users of this metrics can deduce Bluetooth device's connection state from these events |
| 1622 | // - HCI commands are logged before the command is sent, after receiving command status, and after |
| 1623 | // receiving command complete |
| 1624 | // - HCI events are logged when they arrive |
| 1625 | // |
| 1626 | // Low level log from system/bt |
| 1627 | // |
| 1628 | // Bluetooth classic commands: |
| 1629 | // - CMD_CREATE_CONNECTION |
| 1630 | // - CMD_DISCONNECT |
| 1631 | // - CMD_CREATE_CONNECTION_CANCEL |
| 1632 | // - CMD_ACCEPT_CONNECTION_REQUEST |
| 1633 | // - CMD_REJECT_CONNECTION_REQUEST |
| 1634 | // - CMD_SETUP_ESCO_CONNECTION |
| 1635 | // - CMD_ACCEPT_ESCO_CONNECTION |
| 1636 | // - CMD_REJECT_ESCO_CONNECTION |
| 1637 | // - CMD_ENH_SETUP_ESCO_CONNECTION |
| 1638 | // - CMD_ENH_ACCEPT_ESCO_CONNECTION |
| 1639 | // |
| 1640 | // Bluetooth low energy commands: |
| 1641 | // - CMD_BLE_CREATE_LL_CONN [Only logged on error or when initiator filter policy is 0x00] |
| 1642 | // - CMD_BLE_CREATE_CONN_CANCEL [Only logged when there is an error] |
| 1643 | // - CMD_BLE_EXTENDED_CREATE_CONNECTION [Only logged on error or when initiator filter policy is 0x00] |
| 1644 | // - CMD_BLE_CLEAR_WHITE_LIST |
| 1645 | // - CMD_BLE_ADD_WHITE_LIST |
| 1646 | // - CMD_BLE_REMOVE_WHITE_LIST |
| 1647 | // |
| 1648 | // Bluetooth classic events: |
| 1649 | // - EVT_CONNECTION_COMP |
| 1650 | // - EVT_CONNECTION_REQUEST |
| 1651 | // - EVT_DISCONNECTION_COMP |
| 1652 | // - EVT_ESCO_CONNECTION_COMP |
| 1653 | // - EVT_ESCO_CONNECTION_CHANGED |
| 1654 | // |
| 1655 | // Bluetooth low energy meta events: |
| 1656 | // - BLE_EVT_CONN_COMPLETE_EVT |
| 1657 | // - BLE_EVT_ENHANCED_CONN_COMPLETE_EVT |
| 1658 | // |
| 1659 | // Next tag: 10 |
| 1660 | message BluetoothLinkLayerConnectionEvent { |
| 1661 | // An identifier that can be used to match events for this device. |
| 1662 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 1663 | // Salt: Randomly generated 256 bit value |
| 1664 | // Hash algorithm: HMAC-SHA256 |
| 1665 | // Size: 32 byte |
| 1666 | // Default: null or empty if the device identifier is not known |
| 1667 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 1668 | // Connection handle of this connection if available |
| 1669 | // Range: 0x0000 - 0x0EFF (12 bits) |
| 1670 | // Default: 0xFFFF if the handle is unknown |
| 1671 | optional int32 connection_handle = 2; |
| 1672 | // Direction of the link |
| 1673 | // Default: DIRECTION_UNKNOWN |
| 1674 | optional android.bluetooth.DirectionEnum direction = 3; |
| 1675 | // Type of this link |
| 1676 | // Default: LINK_TYPE_UNKNOWN |
| 1677 | optional android.bluetooth.LinkTypeEnum type = 4; |
| 1678 | |
| 1679 | // Reason metadata for this link layer connection event, rules for interpretation: |
| 1680 | // 1. If hci_cmd is set and valid, hci_event can be either EVT_COMMAND_STATUS or |
| 1681 | // EVT_COMMAND_COMPLETE, ignore hci_ble_event in this case |
| 1682 | // 2. If hci_event is set to EVT_BLE_META, look at hci_ble_event; otherwise, if hci_event is |
| 1683 | // set and valid, ignore hci_ble_event |
| 1684 | |
| 1685 | // HCI command associated with this event |
| 1686 | // Default: CMD_UNKNOWN |
| 1687 | optional android.bluetooth.hci.CommandEnum hci_cmd = 5; |
| 1688 | // HCI event associated with this event |
| 1689 | // Default: EVT_UNKNOWN |
| 1690 | optional android.bluetooth.hci.EventEnum hci_event = 6; |
| 1691 | // HCI BLE meta event associated with this event |
| 1692 | // Default: BLE_EVT_UNKNOWN |
| 1693 | optional android.bluetooth.hci.BleMetaEventEnum hci_ble_event = 7; |
| 1694 | // HCI command status code if this is triggerred by hci_cmd |
| 1695 | // Default: STATUS_UNKNOWN |
| 1696 | optional android.bluetooth.hci.StatusEnum cmd_status = 8; |
| 1697 | // HCI reason code associated with this event |
| 1698 | // Default: STATUS_UNKNOWN |
| 1699 | optional android.bluetooth.hci.StatusEnum reason_code = 9; |
| 1700 | } |
| 1701 | |
Howard Ro | e103fe2 | 2019-01-17 16:52:16 -0800 | [diff] [blame] | 1702 | /** |
| 1703 | * Logs when a module is rolled back by Watchdog. |
| 1704 | * |
| 1705 | * Logged from: Rollback Manager |
| 1706 | */ |
| 1707 | message WatchdogRollbackOccurred { |
| 1708 | enum RollbackType { |
| 1709 | UNKNOWN = 0; |
| 1710 | ROLLBACK_INITIATE = 1; |
| 1711 | ROLLBACK_SUCCESS = 2; |
| 1712 | ROLLBACK_FAILURE = 3; |
Howard Ro | e4d6fed | 2019-03-04 16:54:19 -0800 | [diff] [blame] | 1713 | ROLLBACK_BOOT_TRIGGERED = 4; |
Howard Ro | e103fe2 | 2019-01-17 16:52:16 -0800 | [diff] [blame] | 1714 | } |
| 1715 | optional RollbackType rollback_type = 1; |
| 1716 | |
| 1717 | optional string package_name = 2; |
| 1718 | |
| 1719 | optional int32 package_version_code = 3; |
Gavin Corkery | dd1daba | 2019-11-27 19:11:13 +0000 | [diff] [blame] | 1720 | |
| 1721 | enum RollbackReasonType { |
| 1722 | REASON_UNKNOWN = 0; |
| 1723 | REASON_NATIVE_CRASH = 1; |
| 1724 | REASON_EXPLICIT_HEALTH_CHECK = 2; |
| 1725 | REASON_APP_CRASH = 3; |
| 1726 | REASON_APP_NOT_RESPONDING = 4; |
Gavin Corkery | 3285d22 | 2020-01-17 19:24:22 +0000 | [diff] [blame] | 1727 | REASON_NATIVE_CRASH_DURING_BOOT = 5; |
Gavin Corkery | dd1daba | 2019-11-27 19:11:13 +0000 | [diff] [blame] | 1728 | } |
| 1729 | optional RollbackReasonType rollback_reason = 4; |
| 1730 | |
| 1731 | // Set by RollbackPackageHealthObserver to be the package that is failing when a rollback |
| 1732 | // is initiated. Empty if the package is unknown. |
| 1733 | optional string failing_package_name = 5; |
Howard Ro | e103fe2 | 2019-01-17 16:52:16 -0800 | [diff] [blame] | 1734 | } |
| 1735 | |
Jack He | c27040a | 2019-01-09 20:54:41 -0800 | [diff] [blame] | 1736 | /** |
| 1737 | * Logs when there is a change in Bluetooth A2DP playback state |
| 1738 | * |
| 1739 | * Logged from: |
| 1740 | * packages/apps/Bluetooth/src/com/android/bluetooth/a2dp/A2dpService.java |
| 1741 | */ |
| 1742 | message BluetoothA2dpPlaybackStateChanged { |
| 1743 | // An identifier that can be used to match events for this device. |
| 1744 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 1745 | // Salt: Randomly generated 256 bit value |
| 1746 | // Hash algorithm: HMAC-SHA256 |
| 1747 | // Size: 32 byte |
| 1748 | // Default: null or empty if the device identifier is not known |
| 1749 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 1750 | // Current playback state |
| 1751 | // Default: PLAYBACK_STATE_UNKNOWN |
| 1752 | optional android.bluetooth.a2dp.PlaybackStateEnum playback_state = 2; |
| 1753 | // Current audio coding mode |
| 1754 | // Default: AUDIO_CODING_MODE_UNKNOWN |
| 1755 | optional android.bluetooth.a2dp.AudioCodingModeEnum audio_coding_mode = 3; |
| 1756 | } |
| 1757 | |
| 1758 | /** |
| 1759 | * Logs when there is a change in A2DP codec config for a particular remote device |
| 1760 | * |
| 1761 | * Logged from: |
| 1762 | * frameworks/base/core/java/android/bluetooth/BluetoothCodecConfig.java |
| 1763 | * packages/apps/Bluetooth/src/com/android/bluetooth/a2dp/A2dpService.java |
| 1764 | */ |
| 1765 | message BluetoothA2dpCodecConfigChanged { |
| 1766 | // An identifier that can be used to match events for this device. |
| 1767 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 1768 | // Salt: Randomly generated 256 bit value |
| 1769 | // Hash algorithm: HMAC-SHA256 |
| 1770 | // Size: 32 byte |
| 1771 | // Default: null or empty if the device identifier is not known |
| 1772 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 1773 | // Type of codec as defined by various SOURCE_CODEC_TYPE_* constants in BluetoothCodecConfig |
| 1774 | // Default SOURCE_CODEC_TYPE_INVALID |
| 1775 | optional int32 codec_type = 2; |
| 1776 | // Codec priroity, the higher the more preferred, -1 for disabled |
| 1777 | // Default: CODEC_PRIORITY_DEFAULT |
| 1778 | optional int32 codec_priority = 3; |
| 1779 | // Sample rate in Hz as defined by various SAMPLE_RATE_* constants in BluetoothCodecConfig |
| 1780 | // Default: SAMPLE_RATE_NONE |
| 1781 | optional int32 sample_rate = 4; |
| 1782 | // Bits per sample as defined by various BITS_PER_SAMPLE_* constants in BluetoothCodecConfig |
| 1783 | // Default: BITS_PER_SAMPLE_NONE |
| 1784 | optional int32 bits_per_sample = 5; |
| 1785 | // Channel mode as defined by various CHANNEL_MODE_* constants in BluetoothCodecConfig |
| 1786 | // Default: CHANNEL_MODE_NONE |
| 1787 | optional int32 channel_mode = 6; |
| 1788 | // Codec specific values |
| 1789 | // Default 0 |
| 1790 | optional int64 codec_specific_1 = 7; |
| 1791 | optional int64 codec_specific_2 = 8; |
| 1792 | optional int64 codec_specific_3 = 9; |
| 1793 | optional int64 codec_specific_4 = 10; |
| 1794 | } |
| 1795 | |
| 1796 | /** |
| 1797 | * Logs when there is a change in selectable A2DP codec capability for a paricular remote device |
| 1798 | * Each codec's capability is logged separately due to statsd restriction |
| 1799 | * |
| 1800 | * Logged from: |
| 1801 | * frameworks/base/core/java/android/bluetooth/BluetoothCodecConfig.java |
| 1802 | * packages/apps/Bluetooth/src/com/android/bluetooth/a2dp/A2dpService.java |
| 1803 | */ |
| 1804 | message BluetoothA2dpCodecCapabilityChanged { |
| 1805 | // An identifier that can be used to match events for this device. |
| 1806 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 1807 | // Salt: Randomly generated 256 bit value |
| 1808 | // Hash algorithm: HMAC-SHA256 |
| 1809 | // Size: 32 byte |
| 1810 | // Default: null or empty if the device identifier is not known |
| 1811 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 1812 | // Type of codec as defined by various SOURCE_CODEC_TYPE_* constants in BluetoothCodecConfig |
| 1813 | // Default SOURCE_CODEC_TYPE_INVALID |
| 1814 | optional int32 codec_type = 2; |
| 1815 | // Codec priroity, the higher the more preferred, -1 for disabled |
| 1816 | // Default: CODEC_PRIORITY_DEFAULT |
| 1817 | optional int32 codec_priority = 3; |
| 1818 | // A bit field of supported sample rates as defined by various SAMPLE_RATE_* constants |
| 1819 | // in BluetoothCodecConfig |
| 1820 | // Default: empty and SAMPLE_RATE_NONE for individual item |
| 1821 | optional int32 sample_rate = 4; |
| 1822 | // A bit field of supported bits per sample as defined by various BITS_PER_SAMPLE_* constants |
| 1823 | // in BluetoothCodecConfig |
| 1824 | // Default: empty and BITS_PER_SAMPLE_NONE for individual item |
| 1825 | optional int32 bits_per_sample = 5; |
| 1826 | // A bit field of supported channel mode as defined by various CHANNEL_MODE_* constants in |
| 1827 | // BluetoothCodecConfig |
| 1828 | // Default: empty and CHANNEL_MODE_NONE for individual item |
| 1829 | optional int32 channel_mode = 6; |
| 1830 | // Codec specific values |
| 1831 | // Default 0 |
| 1832 | optional int64 codec_specific_1 = 7; |
| 1833 | optional int64 codec_specific_2 = 8; |
| 1834 | optional int64 codec_specific_3 = 9; |
| 1835 | optional int64 codec_specific_4 = 10; |
| 1836 | } |
| 1837 | |
| 1838 | /** |
| 1839 | * Logs when A2DP failed to read from PCM source. |
| 1840 | * This typically happens when audio HAL cannot supply A2DP with data fast enough for encoding. |
| 1841 | * |
| 1842 | * Logged from: |
| 1843 | * system/bt |
| 1844 | */ |
| 1845 | message BluetoothA2dpAudioUnderrunReported { |
| 1846 | // An identifier that can be used to match events for this device. |
| 1847 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 1848 | // Salt: Randomly generated 256 bit value |
| 1849 | // Hash algorithm: HMAC-SHA256 |
| 1850 | // Size: 32 byte |
| 1851 | // Default: null or empty if the device identifier is not known |
| 1852 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 1853 | // Encoding interval in nanoseconds |
| 1854 | // Default: 0 |
| 1855 | optional int64 encoding_interval_nanos = 2; |
| 1856 | // Number of bytes of PCM data that could not be read from the source |
| 1857 | // Default: 0 |
| 1858 | optional int32 num_missing_pcm_bytes = 3; |
| 1859 | } |
| 1860 | |
| 1861 | /** |
| 1862 | * Logs when A2DP failed send encoded data to the remote device fast enough such that the transmit |
| 1863 | * buffer queue is full and we have to drop data |
| 1864 | * |
| 1865 | * Logged from: |
| 1866 | * system/bt |
| 1867 | */ |
| 1868 | message BluetoothA2dpAudioOverrunReported { |
| 1869 | // An identifier that can be used to match events for this device. |
| 1870 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 1871 | // Salt: Randomly generated 256 bit value |
| 1872 | // Hash algorithm: HMAC-SHA256 |
| 1873 | // Size: 32 byte |
| 1874 | // Default: null or empty if the device identifier is not known |
| 1875 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 1876 | // Encoding interval in nanoseconds |
| 1877 | // Default: 0 |
| 1878 | optional int64 encoding_interval_nanos = 2; |
| 1879 | // Number of buffers dropped in this event |
| 1880 | // Each buffer is encoded in one encoding interval and consists of multiple encoded frames |
| 1881 | // Default: 0 |
| 1882 | optional int32 num_dropped_buffers = 3; |
| 1883 | // Number of encoded buffers dropped in this event |
| 1884 | // Default 0 |
| 1885 | optional int32 num_dropped_encoded_frames = 4; |
| 1886 | // Number of encoded bytes dropped in this event |
| 1887 | // Default: 0 |
| 1888 | optional int32 num_dropped_encoded_bytes = 5; |
| 1889 | } |
| 1890 | |
| 1891 | /** |
| 1892 | * Logs when we receive reports regarding a device's RSSI value |
| 1893 | * |
| 1894 | * Logged from: |
| 1895 | * system/bt |
| 1896 | */ |
| 1897 | message BluetoothDeviceRssiReported { |
| 1898 | // An identifier that can be used to match events for this device. |
| 1899 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 1900 | // Salt: Randomly generated 256 bit value |
| 1901 | // Hash algorithm: HMAC-SHA256 |
| 1902 | // Size: 32 byte |
| 1903 | // Default: null or empty if the device identifier is not known |
| 1904 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 1905 | // Connection handle of this connection if available |
| 1906 | // Range: 0x0000 - 0x0EFF (12 bits) |
| 1907 | // Default: 0xFFFF if the handle is unknown |
| 1908 | optional int32 connection_handle = 2; |
| 1909 | // HCI command status code if this is triggerred by hci_cmd |
| 1910 | // Default: STATUS_UNKNOWN |
| 1911 | optional android.bluetooth.hci.StatusEnum hci_status = 3; |
| 1912 | // BR/EDR |
| 1913 | // Range: -128 ≤ N ≤ 127 (signed integer) |
| 1914 | // Units: dB |
| 1915 | // LE: |
| 1916 | // Range: -127 to 20, 127 (signed integer) |
| 1917 | // Units: dBm |
| 1918 | // Invalid when an out of range value is reported |
| 1919 | optional int32 rssi = 4; |
| 1920 | } |
| 1921 | |
| 1922 | /** |
| 1923 | * Logs when we receive reports regarding how many consecutive failed contacts for a connection |
| 1924 | * |
| 1925 | * Logged from: |
| 1926 | * system/bt |
| 1927 | */ |
| 1928 | message BluetoothDeviceFailedContactCounterReported { |
| 1929 | // An identifier that can be used to match events for this device. |
| 1930 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 1931 | // Salt: Randomly generated 256 bit value |
| 1932 | // Hash algorithm: HMAC-SHA256 |
| 1933 | // Size: 32 byte |
| 1934 | // Default: null or empty if the device identifier is not known |
| 1935 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 1936 | // Connection handle of this connection if available |
| 1937 | // Range: 0x0000 - 0x0EFF (12 bits) |
| 1938 | // Default: 0xFFFF if the handle is unknown |
| 1939 | optional int32 connection_handle = 2; |
| 1940 | // HCI command status code if this is triggerred by hci_cmd |
| 1941 | // Default: STATUS_UNKNOWN |
| 1942 | optional android.bluetooth.hci.StatusEnum cmd_status = 3; |
| 1943 | // Number of consecutive failed contacts for a connection corresponding to the Handle |
| 1944 | // Range: uint16_t, 0-0xFFFF |
| 1945 | // Default: 0xFFFFF |
| 1946 | optional int32 failed_contact_counter = 4; |
| 1947 | } |
| 1948 | |
| 1949 | /** |
| 1950 | * Logs when we receive reports regarding the tranmit power level used for a specific connection |
| 1951 | * |
| 1952 | * Logged from: |
| 1953 | * system/bt |
| 1954 | */ |
| 1955 | message BluetoothDeviceTxPowerLevelReported { |
| 1956 | // An identifier that can be used to match events for this device. |
| 1957 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 1958 | // Salt: Randomly generated 256 bit value |
| 1959 | // Hash algorithm: HMAC-SHA256 |
| 1960 | // Size: 32 byte |
| 1961 | // Default: null or empty if the device identifier is not known |
| 1962 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 1963 | // Connection handle of this connection if available |
| 1964 | // Range: 0x0000 - 0x0EFF (12 bits) |
| 1965 | // Default: 0xFFFF if the handle is unknown |
| 1966 | optional int32 connection_handle = 2; |
Jack He | 1021a61 | 2019-01-20 21:22:46 -0800 | [diff] [blame] | 1967 | // HCI command status code if this is triggered by hci_cmd |
Jack He | c27040a | 2019-01-09 20:54:41 -0800 | [diff] [blame] | 1968 | // Default: STATUS_UNKNOWN |
| 1969 | optional android.bluetooth.hci.StatusEnum hci_status = 3; |
| 1970 | // Range: -30 ≤ N ≤ 20 |
| 1971 | // Units: dBm |
| 1972 | // Invalid when an out of range value is reported |
| 1973 | optional int32 transmit_power_level = 4; |
| 1974 | } |
Jack He | ab86dbd2 | 2018-12-18 15:43:27 -0800 | [diff] [blame] | 1975 | |
Tej Singh | 5d991e1 | 2018-03-09 19:48:11 -0800 | [diff] [blame] | 1976 | /** |
Jack He | 1021a61 | 2019-01-20 21:22:46 -0800 | [diff] [blame] | 1977 | * Logs when Bluetooth controller failed to reply with command status within a timeout period after |
| 1978 | * receiving an HCI command from the host |
| 1979 | * |
| 1980 | * Logged from: system/bt |
| 1981 | */ |
| 1982 | message BluetoothHciTimeoutReported { |
| 1983 | // HCI command associated with this event |
| 1984 | // Default: CMD_UNKNOWN |
| 1985 | optional android.bluetooth.hci.CommandEnum hci_command = 1; |
| 1986 | } |
| 1987 | |
| 1988 | /** |
| 1989 | * Logs when we receive Bluetooth Link Quality Report event from the controller |
| 1990 | * See Android Bluetooth HCI specification for more details |
| 1991 | * |
| 1992 | * Note: all count and bytes field are counted since last event |
| 1993 | * |
| 1994 | * Logged from: system/bt |
| 1995 | */ |
| 1996 | message BluetoothQualityReportReported { |
| 1997 | // Quality report ID |
| 1998 | // Original type: uint8_t |
| 1999 | // Default: BQR_ID_UNKNOWN |
| 2000 | optional android.bluetooth.hci.BqrIdEnum quality_report_id = 1; |
| 2001 | // Packet type of the connection |
| 2002 | // Original type: uint8_t |
| 2003 | // Default: BQR_PACKET_TYPE_UNKNOWN |
| 2004 | optional android.bluetooth.hci.BqrPacketTypeEnum packet_types = 2; |
| 2005 | // Connection handle of the connection |
| 2006 | // Original type: uint16_t |
| 2007 | optional int32 connection_handle = 3; |
| 2008 | // Performing Role for the connection |
| 2009 | // Original type: uint8_t |
| 2010 | optional int32 connection_role = 4; |
| 2011 | // Current Transmit Power Level for the connection. This value is the same as the controller's |
| 2012 | // response to the HCI_Read_Transmit_Power_Level HCI command |
| 2013 | // Original type: uint8_t |
| 2014 | optional int32 tx_power_level = 5; |
| 2015 | // Received Signal Strength Indication (RSSI) value for the connection. This value is an |
| 2016 | // absolute receiver signal strength value |
| 2017 | // Original type: int8_t |
| 2018 | optional int32 rssi = 6; |
| 2019 | // Signal-to-Noise Ratio (SNR) value for the connection. It is the average SNR of all the |
| 2020 | // channels used by the link currently |
| 2021 | // Original type: uint8_t |
| 2022 | optional int32 snr = 7; |
| 2023 | // Indicates the number of unused channels in AFH_channel_map |
| 2024 | // Original type: uint8_t |
| 2025 | optional int32 unused_afh_channel_count = 8; |
| 2026 | // Indicates the number of the channels which are interfered and quality is bad but are still |
| 2027 | // selected for AFH |
| 2028 | // Original type: uint8_t |
| 2029 | optional int32 afh_select_unideal_channel_count = 9; |
| 2030 | // Current Link Supervision Timeout Setting |
| 2031 | // Unit: N * 0.3125 ms (1 Bluetooth Clock) |
| 2032 | // Original type: uint16_t |
| 2033 | optional int32 lsto = 10; |
| 2034 | // Piconet Clock for the specified Connection_Handle. This value is the same as the controller's |
| 2035 | // response to HCI_Read_Clock HCI command with the parameter "Which_Clock" of |
| 2036 | // 0x01 (Piconet Clock) |
| 2037 | // Unit: N * 0.3125 ms (1 Bluetooth Clock) |
| 2038 | // Original type: uint32_t |
| 2039 | optional int64 connection_piconet_clock = 11; |
| 2040 | // The count of retransmission |
| 2041 | // Original type: uint32_t |
| 2042 | optional int64 retransmission_count = 12; |
| 2043 | // The count of no RX |
| 2044 | // Original type: uint32_t |
| 2045 | optional int64 no_rx_count = 13; |
| 2046 | // The count of NAK (Negative Acknowledge) |
| 2047 | // Original type: uint32_t |
| 2048 | optional int64 nak_count = 14; |
| 2049 | // Controller timestamp of last TX ACK |
| 2050 | // Unit: N * 0.3125 ms (1 Bluetooth Clock) |
| 2051 | // Original type: uint32_t |
| 2052 | optional int64 last_tx_ack_timestamp = 15; |
| 2053 | // The count of Flow-off (STOP) |
| 2054 | // Original type: uint32_t |
| 2055 | optional int64 flow_off_count = 16; |
| 2056 | // Controller timestamp of last Flow-on (GO) |
| 2057 | // Unit: N * 0.3125 ms (1 Bluetooth Clock) |
| 2058 | // Original type: uint32_t |
| 2059 | optional int64 last_flow_on_timestamp = 17; |
| 2060 | // Buffer overflow count (how many bytes of TX data are dropped) since the last event |
| 2061 | // Original type: uint32_t |
| 2062 | optional int64 buffer_overflow_bytes = 18; |
| 2063 | // Buffer underflow count (in byte) since last event |
| 2064 | // Original type: uint32_t |
| 2065 | optional int64 buffer_underflow_bytes = 19; |
| 2066 | } |
| 2067 | |
| 2068 | /** |
| 2069 | * Logs when a Bluetooth device's manufacturer information is learnt by the Bluetooth stack |
| 2070 | * |
| 2071 | * Notes: |
| 2072 | * - Each event can be partially filled as we might learn different pieces of device |
| 2073 | * information at different time |
| 2074 | * - Multiple device info events can be combined to give more complete picture |
| 2075 | * - When multiple device info events tries to describe the same information, the |
| 2076 | * later one wins |
| 2077 | * |
| 2078 | * Logged from: |
| 2079 | * packages/apps/Bluetooth |
| 2080 | */ |
Jack He | aea2698 | 2019-04-04 11:19:48 -0700 | [diff] [blame] | 2081 | message BluetoothDeviceInfoReported { |
Jack He | 1021a61 | 2019-01-20 21:22:46 -0800 | [diff] [blame] | 2082 | // An identifier that can be used to match events for this device. |
| 2083 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 2084 | // Salt: Randomly generated 256 bit value |
| 2085 | // Hash algorithm: HMAC-SHA256 |
| 2086 | // Size: 32 byte |
| 2087 | // Default: null or empty if the device identifier is not known |
| 2088 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 2089 | // Where is this device info obtained from |
| 2090 | optional android.bluetooth.DeviceInfoSrcEnum source_type = 2; |
| 2091 | // Name of the data source |
| 2092 | // For EXTERNAL: package name of the data source |
| 2093 | // For INTERNAL: null for general case, component name otherwise |
| 2094 | optional string source_name = 3; |
| 2095 | // Name of the manufacturer of this device |
| 2096 | optional string manufacturer = 4; |
| 2097 | // Model of this device |
| 2098 | optional string model = 5; |
| 2099 | // Hardware version of this device |
| 2100 | optional string hardware_version = 6; |
| 2101 | // Software version of this device |
| 2102 | optional string software_version = 7; |
| 2103 | } |
| 2104 | |
| 2105 | /** |
| 2106 | * Logs when we receive Bluetooth Read Remote Version Information Complete Event from the remote |
| 2107 | * device, as documented by the Bluetooth Core HCI specification |
| 2108 | * Reference: https://www.bluetooth.com/specifications/bluetooth-core-specification |
| 2109 | * Vol 2, Part E, Page 1118 |
| 2110 | * |
| 2111 | * Logged from: |
| 2112 | * system/bt |
| 2113 | */ |
| 2114 | message BluetoothRemoteVersionInfoReported { |
| 2115 | // Connection handle of the connection |
| 2116 | // Original type: uint16_t |
| 2117 | optional int32 connection_handle = 1; |
| 2118 | // HCI command status code |
| 2119 | // Default: STATUS_UNKNOWN |
| 2120 | optional android.bluetooth.hci.StatusEnum hci_status = 2; |
| 2121 | // 1 byte Version of current LMP in the remote controller |
| 2122 | optional int32 lmp_version = 3; |
| 2123 | // 2 bytes LMP manufacturer code of the remote controller |
| 2124 | // https://www.bluetooth.com/specifications/assigned-numbers/company-identifiers |
| 2125 | optional int32 lmp_manufacturer_code = 4; |
| 2126 | // 4 bytes subversion of the LMP in the remote controller |
| 2127 | optional int32 lmp_subversion = 5; |
| 2128 | } |
| 2129 | |
| 2130 | /** |
| 2131 | * Logs when certain Bluetooth SDP attributes are discovered |
| 2132 | * Constant definitions are from: |
| 2133 | * https://www.bluetooth.com/specifications/assigned-numbers/service-discovery |
| 2134 | * |
| 2135 | * Current logged attributes: |
| 2136 | * - BluetoothProfileDescriptorList |
| 2137 | * - Supported Features Bitmask |
| 2138 | * |
| 2139 | * Logged from: |
| 2140 | * system/bt |
| 2141 | */ |
| 2142 | message BluetoothSdpAttributeReported { |
| 2143 | // An identifier that can be used to match events for this device. |
| 2144 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 2145 | // Salt: Randomly generated 256 bit value |
| 2146 | // Hash algorithm: HMAC-SHA256 |
| 2147 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 2148 | // Short form UUIDs used to identify Bluetooth protocols, profiles, and service classes |
| 2149 | // Original type: uint16_t |
| 2150 | optional int32 protocol_uuid = 2; |
| 2151 | // Short form UUIDs used to identify Bluetooth SDP attribute types |
| 2152 | // Original type: uint16_t |
| 2153 | optional int32 attribute_id = 3; |
| 2154 | // Attribute value for the particular attribute |
| 2155 | optional bytes attribute_value = 4 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 2156 | } |
| 2157 | |
| 2158 | /** |
| 2159 | * Logs when bond state of a Bluetooth device changes |
| 2160 | * |
| 2161 | * Logged from: |
| 2162 | * frameworks/base/core/java/android/bluetooth/BluetoothDevice.java |
| 2163 | * packages/apps/Bluetooth/src/com/android/bluetooth/btservice/BondStateMachine.java |
| 2164 | */ |
| 2165 | message BluetoothBondStateChanged { |
| 2166 | // An identifier that can be used to match events for this device. |
| 2167 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 2168 | // Salt: Randomly generated 256 bit value |
| 2169 | // Hash algorithm: HMAC-SHA256 |
| 2170 | // Size: 32 byte |
| 2171 | // Default: null or empty if the device identifier is not known |
| 2172 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 2173 | // Preferred transport type to remote dual mode device |
| 2174 | // Default: TRANSPORT_AUTO means no preference |
| 2175 | optional android.bluetooth.TransportTypeEnum transport = 2; |
| 2176 | // The type of this Bluetooth device (Classic, LE, or Dual mode) |
| 2177 | // Default: UNKNOWN |
| 2178 | optional android.bluetooth.DeviceTypeEnum type = 3; |
| 2179 | // Current bond state (NONE, BONDING, BONDED) |
| 2180 | // Default: BOND_STATE_UNKNOWN |
| 2181 | optional android.bluetooth.BondStateEnum bond_state = 4; |
| 2182 | // Bonding sub state |
| 2183 | // Default: BOND_SUB_STATE_UNKNOWN |
| 2184 | optional android.bluetooth.BondSubStateEnum bonding_sub_state = 5; |
| 2185 | // Unbond Reason |
| 2186 | // Default: UNBOND_REASON_UNKNOWN |
| 2187 | optional android.bluetooth.UnbondReasonEnum unbond_reason = 6; |
| 2188 | } |
| 2189 | |
| 2190 | /** |
| 2191 | * Logs there is an event related Bluetooth classic pairing |
| 2192 | * |
| 2193 | * Logged from: |
| 2194 | * system/bt |
| 2195 | */ |
| 2196 | message BluetoothClassicPairingEventReported { |
| 2197 | // An identifier that can be used to match events for this device. |
| 2198 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 2199 | // Salt: Randomly generated 256 bit value |
| 2200 | // Hash algorithm: HMAC-SHA256 |
| 2201 | // Size: 32 byte |
| 2202 | // Default: null or empty if the device identifier is not known |
| 2203 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 2204 | // Connection handle of this connection if available |
| 2205 | // Range: 0x0000 - 0x0EFF (12 bits) |
| 2206 | // Default: 0xFFFF if the handle is unknown |
| 2207 | optional int32 connection_handle = 2; |
| 2208 | // HCI command associated with this event |
| 2209 | // Default: CMD_UNKNOWN |
| 2210 | optional android.bluetooth.hci.CommandEnum hci_cmd = 3; |
| 2211 | // HCI event associated with this event |
| 2212 | // Default: EVT_UNKNOWN |
| 2213 | optional android.bluetooth.hci.EventEnum hci_event = 4; |
| 2214 | // HCI command status code if this is triggerred by hci_cmd |
| 2215 | // Default: STATUS_UNKNOWN |
| 2216 | optional android.bluetooth.hci.StatusEnum cmd_status = 5; |
| 2217 | // HCI reason code associated with this event |
| 2218 | // Default: STATUS_UNKNOWN |
| 2219 | optional android.bluetooth.hci.StatusEnum reason_code = 6; |
Jack He | 3b25983 | 2019-03-20 03:47:29 -0700 | [diff] [blame] | 2220 | // A status value related to this specific event |
| 2221 | // Default: 0 |
| 2222 | optional int64 event_value = 7; |
Jack He | 1021a61 | 2019-01-20 21:22:46 -0800 | [diff] [blame] | 2223 | } |
| 2224 | |
| 2225 | /** |
| 2226 | * Logs when there is an event related to Bluetooth Security Manager Protocol (SMP) |
| 2227 | * |
| 2228 | * Logged from: |
| 2229 | * system/bt |
| 2230 | */ |
| 2231 | message BluetoothSmpPairingEventReported { |
| 2232 | // An identifier that can be used to match events for this device. |
| 2233 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 2234 | // Salt: Randomly generated 256 bit value |
| 2235 | // Hash algorithm: HMAC-SHA256 |
| 2236 | // Size: 32 byte |
| 2237 | // Default: null or empty if the device identifier is not known |
| 2238 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 2239 | // SMP command sent or received over L2CAP |
| 2240 | // Default: CMD_UNKNOWN |
| 2241 | optional android.bluetooth.smp.CommandEnum smp_command = 2; |
| 2242 | // Whether this command is sent or received |
| 2243 | // Default: DIRECTION_UNKNOWN |
| 2244 | optional android.bluetooth.DirectionEnum direction = 3; |
| 2245 | // SMP failure reason code |
| 2246 | // Default: PAIRING_FAIL_REASON_DEFAULT |
| 2247 | optional android.bluetooth.smp.PairingFailReasonEnum smp_fail_reason = 4; |
| 2248 | } |
| 2249 | |
| 2250 | /** |
Jack He | 815cdba | 2019-01-30 17:24:55 -0800 | [diff] [blame] | 2251 | * Logs when a Bluetooth socket’s connection state changed |
| 2252 | * |
| 2253 | * Logged from: |
| 2254 | * system/bt |
| 2255 | */ |
| 2256 | message BluetoothSocketConnectionStateChanged { |
| 2257 | // An identifier that can be used to match events for this device. |
| 2258 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 2259 | // Salt: Randomly generated 256 bit value |
| 2260 | // Hash algorithm: HMAC-SHA256 |
| 2261 | // Size: 32 byte |
Jack He | e4ae0e7 | 2019-02-07 13:52:45 -0800 | [diff] [blame] | 2262 | // Default: null or empty if this is a server listener socket |
Jack He | 815cdba | 2019-01-30 17:24:55 -0800 | [diff] [blame] | 2263 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
Jack He | e4ae0e7 | 2019-02-07 13:52:45 -0800 | [diff] [blame] | 2264 | // Temporary port of this socket for the current connection or session only |
Jack He | 815cdba | 2019-01-30 17:24:55 -0800 | [diff] [blame] | 2265 | // Default 0 when unknown or don't care |
| 2266 | optional int32 port = 2; |
| 2267 | // Socket type as mentioned in |
| 2268 | // frameworks/base/core/java/android/bluetooth/BluetoothSocket.java |
| 2269 | // Default: SOCKET_TYPE_UNKNOWN |
| 2270 | optional android.bluetooth.SocketTypeEnum type = 3; |
| 2271 | // Socket connection state |
| 2272 | // Default: SOCKET_CONNECTION_STATE_UNKNOWN |
| 2273 | optional android.bluetooth.SocketConnectionstateEnum state = 4; |
| 2274 | // Number of bytes sent to remote device during this connection |
| 2275 | optional int64 tx_bytes = 5; |
| 2276 | // Number of bytes received from remote device during this connection |
| 2277 | optional int64 rx_bytes = 6; |
Jack He | e4ae0e7 | 2019-02-07 13:52:45 -0800 | [diff] [blame] | 2278 | // Socket owner's UID |
| 2279 | optional int32 uid = 7 [(is_uid) = true]; |
| 2280 | // Server port of this socket, if any. When both |server_port| and |port| fields are populated, |
| 2281 | // |port| must be spawned by |server_port| |
| 2282 | // Default 0 when unknown or don't care |
| 2283 | optional int32 server_port = 8; |
| 2284 | // Whether this is a server listener socket |
| 2285 | optional android.bluetooth.SocketRoleEnum is_server = 9; |
Jack He | 815cdba | 2019-01-30 17:24:55 -0800 | [diff] [blame] | 2286 | } |
| 2287 | |
| 2288 | /** |
Jack He | 7142680 | 2019-04-02 13:32:52 -0700 | [diff] [blame] | 2289 | * Logs when Class of Device (CoD) value is learnt for a device during pairing or connection |
| 2290 | * |
| 2291 | * Logged from: |
| 2292 | * packages/apps/Bluetooth/src/com/android/bluetooth/btservice/BondStateMachine.java |
| 2293 | * packages/apps/Bluetooth/src/com/android/bluetooth/btservice/RemoteDevices.java |
| 2294 | * |
| 2295 | */ |
| 2296 | message BluetoothClassOfDeviceReported { |
| 2297 | // An identifier that can be used to match events for this device. |
| 2298 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 2299 | // Salt: Randomly generated 256 bit value |
| 2300 | // Hash algorithm: HMAC-SHA256 |
| 2301 | // Size: 32 byte |
| 2302 | // Default: null or empty if this is a server listener socket |
| 2303 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 2304 | // Class of Device (CoD) value including both Major, Minor device class and service class |
| 2305 | // Defined in: https://www.bluetooth.com/specifications/assigned-numbers/baseband |
| 2306 | // Also defined in: https://developer.android.com/reference/android/bluetooth/BluetoothClass |
| 2307 | // Default: 0 |
| 2308 | optional int32 class_of_device = 2; |
| 2309 | } |
| 2310 | |
| 2311 | /** |
Andrew Chant | 28d627e | 2018-02-22 15:17:05 -0800 | [diff] [blame] | 2312 | * Logs when something is plugged into or removed from the USB-C connector. |
| 2313 | * |
| 2314 | * Logged from: |
Badhri Jagan Sridharan | 223b3c7 | 2018-11-16 16:02:35 -0800 | [diff] [blame] | 2315 | * UsbService |
Andrew Chant | 28d627e | 2018-02-22 15:17:05 -0800 | [diff] [blame] | 2316 | */ |
| 2317 | message UsbConnectorStateChanged { |
| 2318 | enum State { |
Badhri Jagan Sridharan | 223b3c7 | 2018-11-16 16:02:35 -0800 | [diff] [blame] | 2319 | STATE_DISCONNECTED = 0; |
| 2320 | STATE_CONNECTED = 1; |
Andrew Chant | 28d627e | 2018-02-22 15:17:05 -0800 | [diff] [blame] | 2321 | } |
| 2322 | optional State state = 1; |
Badhri Jagan Sridharan | 223b3c7 | 2018-11-16 16:02:35 -0800 | [diff] [blame] | 2323 | optional string id = 2; |
Badhri Jagan Sridharan | faf6207 | 2018-11-16 17:17:03 -0800 | [diff] [blame] | 2324 | // Last active session in ms. |
| 2325 | // 0 when the port is in connected state. |
| 2326 | optional int64 last_connect_duration_millis = 3; |
Andrew Chant | 28d627e | 2018-02-22 15:17:05 -0800 | [diff] [blame] | 2327 | } |
| 2328 | |
| 2329 | /** |
| 2330 | * Logs the reported speaker impedance. |
| 2331 | * |
| 2332 | * Logged from: |
| 2333 | * Vendor audio implementation. |
| 2334 | */ |
| 2335 | message SpeakerImpedanceReported { |
| 2336 | optional int32 speaker_location = 1; |
| 2337 | optional int32 impedance = 2; |
| 2338 | } |
| 2339 | |
| 2340 | /** |
| 2341 | * Logs the report of a failed hardware. |
| 2342 | * |
| 2343 | * Logged from: |
| 2344 | * Vendor HALs. |
| 2345 | * |
| 2346 | */ |
| 2347 | message HardwareFailed { |
| 2348 | enum HardwareType { |
| 2349 | HARDWARE_FAILED_UNKNOWN = 0; |
| 2350 | HARDWARE_FAILED_MICROPHONE = 1; |
| 2351 | HARDWARE_FAILED_CODEC = 2; |
| 2352 | HARDWARE_FAILED_SPEAKER = 3; |
| 2353 | HARDWARE_FAILED_FINGERPRINT = 4; |
| 2354 | } |
| 2355 | optional HardwareType hardware_type = 1; |
| 2356 | |
Maggie White | 6dcd857 | 2019-01-31 14:11:50 -0800 | [diff] [blame] | 2357 | /** |
| 2358 | * hardware_location allows vendors to differentiate between multiple instances of |
Andrew Chant | 28d627e | 2018-02-22 15:17:05 -0800 | [diff] [blame] | 2359 | * the same hardware_type. The specific locations are vendor defined integers, |
| 2360 | * referring to board-specific numbering schemes. |
| 2361 | */ |
| 2362 | optional int32 hardware_location = 2; |
| 2363 | |
Maggie White | 6dcd857 | 2019-01-31 14:11:50 -0800 | [diff] [blame] | 2364 | /** |
| 2365 | * failure_code is specific to the HardwareType of the failed hardware. |
| 2366 | * It should use one of the enum values defined below. |
Andrew Chant | 28d627e | 2018-02-22 15:17:05 -0800 | [diff] [blame] | 2367 | */ |
Maggie White | 6dcd857 | 2019-01-31 14:11:50 -0800 | [diff] [blame] | 2368 | enum HardwareErrorCode { |
| 2369 | UNKNOWN = 0; |
| 2370 | COMPLETE = 1; |
| 2371 | SPEAKER_HIGH_Z = 2; |
| 2372 | SPEAKER_SHORT = 3; |
| 2373 | FINGERPRINT_SENSOR_BROKEN = 4; |
| 2374 | FINGERPRINT_TOO_MANY_DEAD_PIXELS = 5; |
Maggie White | b76cebc | 2019-02-05 15:21:29 -0800 | [diff] [blame] | 2375 | DEGRADE = 6; |
Andrew Chant | 28d627e | 2018-02-22 15:17:05 -0800 | [diff] [blame] | 2376 | } |
| 2377 | optional int32 failure_code = 3; |
| 2378 | } |
| 2379 | |
| 2380 | /** |
| 2381 | * Log an event when the device has been physically dropped. |
| 2382 | * Reported from the /vendor partition. |
| 2383 | */ |
| 2384 | message PhysicalDropDetected { |
| 2385 | // Confidence that the event was actually a drop, 0 -> 100 |
| 2386 | optional int32 confidence_pctg = 1; |
| 2387 | // Peak acceleration of the drop, in 1/1000s of a g. |
| 2388 | optional int32 accel_peak_thousandths_g = 2; |
Andrew Chant | b56388b | 2018-03-22 21:07:33 -0700 | [diff] [blame] | 2389 | // Duration of freefall in ms |
| 2390 | optional int32 freefall_time_millis = 3; |
Andrew Chant | 28d627e | 2018-02-22 15:17:05 -0800 | [diff] [blame] | 2391 | } |
| 2392 | |
| 2393 | /** |
| 2394 | * Log bucketed battery charge cycles. |
| 2395 | * |
| 2396 | * Each bucket represents cycles of the battery past |
Maggie White | 38c9d32 | 2018-11-20 10:07:52 -0800 | [diff] [blame] | 2397 | * a given charge point. For example, if 10 cycle buckets are |
| 2398 | * initialized, bucket 1 is the lowest 1/10th of the battery, |
| 2399 | * and bucket 10 is 100%. |
Andrew Chant | 28d627e | 2018-02-22 15:17:05 -0800 | [diff] [blame] | 2400 | * |
| 2401 | * Logged from: |
| 2402 | * /sys/class/power_supply/bms/cycle_count, via Vendor. |
| 2403 | */ |
| 2404 | message ChargeCyclesReported { |
| 2405 | optional int32 cycle_bucket_1 = 1; |
| 2406 | optional int32 cycle_bucket_2 = 2; |
| 2407 | optional int32 cycle_bucket_3 = 3; |
| 2408 | optional int32 cycle_bucket_4 = 4; |
| 2409 | optional int32 cycle_bucket_5 = 5; |
| 2410 | optional int32 cycle_bucket_6 = 6; |
| 2411 | optional int32 cycle_bucket_7 = 7; |
| 2412 | optional int32 cycle_bucket_8 = 8; |
Maggie White | 38c9d32 | 2018-11-20 10:07:52 -0800 | [diff] [blame] | 2413 | optional int32 cycle_bucket_9 = 9; |
| 2414 | optional int32 cycle_bucket_10 = 10; |
Andrew Chant | 28d627e | 2018-02-22 15:17:05 -0800 | [diff] [blame] | 2415 | } |
| 2416 | |
| 2417 | /** |
Howard Ro | a46b658 | 2018-09-18 16:45:02 -0700 | [diff] [blame] | 2418 | * Log battery health snapshot. |
| 2419 | * |
| 2420 | * Resistance, Voltage, Open Circuit Voltage, Temperature, and Charge Level |
| 2421 | * are snapshotted periodically over 24hrs. |
| 2422 | */ |
| 2423 | message BatteryHealthSnapshot { |
| 2424 | enum BatterySnapshotType { |
| 2425 | UNKNOWN = 0; |
| 2426 | MIN_TEMP = 1; // Snapshot at min batt temp over 24hrs. |
| 2427 | MAX_TEMP = 2; // Snapshot at max batt temp over 24hrs. |
| 2428 | MIN_RESISTANCE = 3; // Snapshot at min batt resistance over 24hrs. |
| 2429 | MAX_RESISTANCE = 4; // Snapshot at max batt resistance over 24hrs. |
| 2430 | MIN_VOLTAGE = 5; // Snapshot at min batt voltage over 24hrs. |
| 2431 | MAX_VOLTAGE = 6; // Snapshot at max batt voltage over 24hrs. |
| 2432 | MIN_CURRENT = 7; // Snapshot at min batt current over 24hrs. |
| 2433 | MAX_CURRENT = 8; // Snapshot at max batt current over 24hrs. |
| 2434 | MIN_BATT_LEVEL = 9; // Snapshot at min battery level (SoC) over 24hrs. |
| 2435 | MAX_BATT_LEVEL = 10; // Snapshot at max battery level (SoC) over 24hrs. |
| 2436 | AVG_RESISTANCE = 11; // Snapshot at average battery resistance over 24hrs. |
| 2437 | } |
| 2438 | optional BatterySnapshotType type = 1; |
| 2439 | // Temperature, in 1/10ths of degree C. |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 2440 | optional int32 temperature_deci_celsius = 2; |
Howard Ro | a46b658 | 2018-09-18 16:45:02 -0700 | [diff] [blame] | 2441 | // Voltage Battery Voltage, in microVolts. |
| 2442 | optional int32 voltage_micro_volt = 3; |
| 2443 | // Current Battery current, in microAmps. |
| 2444 | optional int32 current_micro_amps = 4; |
| 2445 | // OpenCircuitVoltage Battery Open Circuit Voltage, in microVolts. |
| 2446 | optional int32 open_circuit_micro_volt = 5; |
| 2447 | // Resistance Battery Resistance, in microOhms. |
| 2448 | optional int32 resistance_micro_ohm = 6; |
| 2449 | // Level Battery Level, as % of full. |
| 2450 | optional int32 level_percent = 7; |
| 2451 | } |
| 2452 | |
| 2453 | /** |
| 2454 | * Log slow I/O operations on the primary storage. |
| 2455 | */ |
| 2456 | message SlowIo { |
| 2457 | // Classifications of IO Operations. |
| 2458 | enum IoOperation { |
| 2459 | UNKNOWN = 0; |
| 2460 | READ = 1; |
| 2461 | WRITE = 2; |
| 2462 | UNMAP = 3; |
| 2463 | SYNC = 4; |
| 2464 | } |
| 2465 | optional IoOperation operation = 1; |
| 2466 | |
| 2467 | // The number of slow IO operations of this type over 24 hours. |
| 2468 | optional int32 count = 2; |
| 2469 | } |
| 2470 | |
| 2471 | /** |
| 2472 | * Log battery caused shutdown with the last recorded voltage. |
| 2473 | */ |
| 2474 | message BatteryCausedShutdown { |
| 2475 | // The last recorded battery voltage prior to shutdown. |
| 2476 | optional int32 last_recorded_micro_volt = 1; |
| 2477 | } |
| 2478 | |
| 2479 | /** |
Tej Singh | a7234499 | 2019-04-17 18:55:08 -0700 | [diff] [blame] | 2480 | * Logs when ThermalService receives throttling events. |
| 2481 | * |
| 2482 | * Logged from: |
| 2483 | * frameworks/base/services/core/java/com/android/server/stats/StatsCompanionService.java |
| 2484 | */ |
| 2485 | message ThermalThrottlingSeverityStateChanged { |
| 2486 | // The type of temperature being reported (CPU, GPU, SKIN, etc) |
| 2487 | optional android.os.TemperatureTypeEnum sensor_type = 1; |
| 2488 | |
| 2489 | // The name of the temperature source. Eg. CPU0 |
| 2490 | optional string sensor_name = 2; |
| 2491 | |
| 2492 | // Temperature in tenths of a degree C. |
| 2493 | // For BCL, it is decimillivolt, decimilliamps, and percentage * 10. |
| 2494 | optional int32 temperature_deci_celsius = 3; |
| 2495 | |
| 2496 | // Relative severity of the throttling, see enum definition. |
| 2497 | optional android.os.ThrottlingSeverityEnum severity = 4; |
| 2498 | } |
| 2499 | |
| 2500 | /** |
Tej Singh | bb8554a | 2018-01-26 11:59:14 -0800 | [diff] [blame] | 2501 | * Logs the duration of a davey (jank of >=700ms) when it occurs |
| 2502 | * |
| 2503 | * Logged from: |
| 2504 | * frameworks/base/libs/hwui/JankTracker.cpp |
| 2505 | */ |
| 2506 | message DaveyOccurred { |
David Chen | 77ef671 | 2018-02-23 18:23:42 -0800 | [diff] [blame] | 2507 | // The UID that logged this atom. |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 2508 | optional int32 uid = 1 [(is_uid) = true]; |
David Chen | 77ef671 | 2018-02-23 18:23:42 -0800 | [diff] [blame] | 2509 | |
Tej Singh | bb8554a | 2018-01-26 11:59:14 -0800 | [diff] [blame] | 2510 | // Amount of time it took to render the frame. Should be >=700ms. |
David Chen | 77ef671 | 2018-02-23 18:23:42 -0800 | [diff] [blame] | 2511 | optional int64 jank_duration_millis = 2; |
Tej Singh | bb8554a | 2018-01-26 11:59:14 -0800 | [diff] [blame] | 2512 | } |
| 2513 | |
| 2514 | /** |
Bookatz | e588524 | 2017-10-24 20:10:31 -0700 | [diff] [blame] | 2515 | * Logs phone signal strength changes. |
| 2516 | * |
| 2517 | * Logged from: |
David Chen | c28b2bb | 2017-10-24 12:52:52 -0700 | [diff] [blame] | 2518 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
Bookatz | e588524 | 2017-10-24 20:10:31 -0700 | [diff] [blame] | 2519 | */ |
| 2520 | message PhoneSignalStrengthChanged { |
Bookatz | 1a1b046 | 2018-01-12 11:47:03 -0800 | [diff] [blame] | 2521 | // Signal strength, from frameworks/base/core/proto/android/telephony/enums.proto. |
| 2522 | optional android.telephony.SignalStrengthEnum signal_strength = 1; |
David Chen | c28b2bb | 2017-10-24 12:52:52 -0700 | [diff] [blame] | 2523 | } |
| 2524 | |
Yangster | 4ccebea | 2018-10-09 17:09:02 -0700 | [diff] [blame] | 2525 | |
| 2526 | /** |
| 2527 | * Logs when the phone state, sim state or signal strength changes |
| 2528 | * |
| 2529 | * Logged from: |
| 2530 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
| 2531 | */ |
| 2532 | message PhoneServiceStateChanged { |
| 2533 | optional android.telephony.ServiceStateEnum state = 1; |
| 2534 | optional android.telephony.SimStateEnum sim_state = 2; |
| 2535 | optional android.telephony.SignalStrengthEnum signal_strength = 3; |
| 2536 | } |
| 2537 | |
| 2538 | /** |
| 2539 | * Logs when the phone becomes on or off. |
| 2540 | * |
| 2541 | * Logged from: |
| 2542 | * frameworks/base/core/java/com/android/internal/os/TelephonyRegistry.java |
| 2543 | */ |
| 2544 | message PhoneStateChanged { |
| 2545 | enum State { |
| 2546 | OFF = 0; |
| 2547 | ON = 1; |
| 2548 | } |
| 2549 | optional State state = 1; |
| 2550 | } |
| 2551 | |
Hyunyoung Song | 2ecb886 | 2019-07-09 09:19:25 -0700 | [diff] [blame] | 2552 | message BackGesture { |
| 2553 | enum BackType { |
| 2554 | DEFAULT_BACK_TYPE = 0; |
| 2555 | COMPLETED = 1; |
| 2556 | COMPLETED_REJECTED = 2; // successful because coming from rejected area |
| 2557 | INCOMPLETE_EXCLUDED = 3; // would have been successful but in the exclusion area |
| 2558 | INCOMPLETE = 4; |
| 2559 | } |
| 2560 | optional BackType type = 1; |
| 2561 | |
| 2562 | optional int32 y_coordinate = 2; // y coordinate for ACTION_DOWN event |
| 2563 | enum WindowHorizontalLocation { |
| 2564 | DEFAULT_LOCATION = 0; |
| 2565 | LEFT = 1; |
| 2566 | RIGHT = 2; |
| 2567 | } |
| 2568 | optional WindowHorizontalLocation x_location = 3; |
| 2569 | } |
| 2570 | |
| 2571 | message ExclusionRectStateChanged { |
| 2572 | optional string component_name = 1; // if not available, simply packageName |
| 2573 | optional int32 requested_height = 2; // px |
| 2574 | optional int32 rejected_height = 3; // px |
| 2575 | |
| 2576 | enum WindowHorizontalLocation { |
| 2577 | DEFAULT_LOCATION = 0; |
| 2578 | LEFT = 1; |
| 2579 | RIGHT = 2; |
| 2580 | } |
| 2581 | optional WindowHorizontalLocation x_location = 4; |
| 2582 | optional bool landscape = 5; |
| 2583 | optional bool splitscreen = 6; |
| 2584 | optional int32 duration_millis = 7; |
| 2585 | } |
| 2586 | |
Hyunyoung Song | c6d6b77 | 2018-10-17 13:35:32 -0700 | [diff] [blame] | 2587 | message LauncherUIChanged { |
Yao Chen | 8c43386 | 2018-10-24 14:09:20 -0700 | [diff] [blame] | 2588 | optional android.stats.launcher.LauncherAction action = 1; |
| 2589 | optional android.stats.launcher.LauncherState src_state = 2; |
| 2590 | optional android.stats.launcher.LauncherState dst_state = 3; |
| 2591 | optional android.stats.launcher.LauncherExtension extension = 4 [(log_mode) = MODE_BYTES]; |
Hyunyoung Song | c6d6b77 | 2018-10-17 13:35:32 -0700 | [diff] [blame] | 2592 | optional bool is_swipe_up_enabled = 5; |
| 2593 | } |
| 2594 | |
Hyunyoung Song | 80adf6be | 2019-01-30 09:59:30 -0800 | [diff] [blame] | 2595 | message StyleUIChanged { |
| 2596 | optional android.stats.style.Action action = 1; |
| 2597 | optional int32 color_package_hash = 2; |
| 2598 | optional int32 font_package_hash = 3; |
| 2599 | optional int32 shape_package_hash = 4; |
| 2600 | optional int32 clock_package_hash = 5; |
| 2601 | optional int32 launcher_grid = 6; |
| 2602 | optional int32 wallpaper_category_hash = 7; |
| 2603 | optional int32 wallpaper_id_hash = 8; |
Kunhung Li | 286c52f | 2019-05-21 20:10:43 +0800 | [diff] [blame] | 2604 | optional int32 color_preference = 9; |
| 2605 | optional android.stats.style.LocationPreference location_preference = 10; |
Hyunyoung Song | 80adf6be | 2019-01-30 09:59:30 -0800 | [diff] [blame] | 2606 | } |
| 2607 | |
David Chen | c28b2bb | 2017-10-24 12:52:52 -0700 | [diff] [blame] | 2608 | /** |
Fan Zhang | 916c13b | 2018-10-16 22:49:45 -0700 | [diff] [blame] | 2609 | * Logs when Settings UI has changed. |
| 2610 | * |
| 2611 | * Logged from: |
| 2612 | * packages/apps/Settings |
| 2613 | */ |
| 2614 | message SettingsUIChanged { |
| 2615 | /** |
Fan Zhang | 916c13b | 2018-10-16 22:49:45 -0700 | [diff] [blame] | 2616 | * Where this SettingsUIChange event comes from. For example, if |
| 2617 | * it's a PAGE_VISIBLE event, where the page is opened from. |
| 2618 | */ |
Fan Zhang | f837b8e | 2018-10-23 12:38:30 -0700 | [diff] [blame] | 2619 | optional android.app.settings.PageId attribution = 1; |
Fan Zhang | 916c13b | 2018-10-16 22:49:45 -0700 | [diff] [blame] | 2620 | |
| 2621 | /** |
| 2622 | * What the UI action is. |
| 2623 | */ |
Fan Zhang | f837b8e | 2018-10-23 12:38:30 -0700 | [diff] [blame] | 2624 | optional android.app.settings.Action action = 2; |
Fan Zhang | 916c13b | 2018-10-16 22:49:45 -0700 | [diff] [blame] | 2625 | |
| 2626 | /** |
| 2627 | * Where the action is happening |
| 2628 | */ |
Fan Zhang | ff2332b | 2018-12-06 15:16:41 -0800 | [diff] [blame] | 2629 | optional android.app.settings.PageId page_id = 3; |
Fan Zhang | 916c13b | 2018-10-16 22:49:45 -0700 | [diff] [blame] | 2630 | |
| 2631 | /** |
| 2632 | * What preference changed in this event. |
| 2633 | */ |
Fan Zhang | ff2332b | 2018-12-06 15:16:41 -0800 | [diff] [blame] | 2634 | optional string changed_preference_key = 4; |
Fan Zhang | 916c13b | 2018-10-16 22:49:45 -0700 | [diff] [blame] | 2635 | |
| 2636 | /** |
| 2637 | * The new value of the changed preference. |
| 2638 | */ |
Fan Zhang | ff2332b | 2018-12-06 15:16:41 -0800 | [diff] [blame] | 2639 | optional int64 changed_preference_int_value = 5; |
Fan Zhang | 916c13b | 2018-10-16 22:49:45 -0700 | [diff] [blame] | 2640 | } |
| 2641 | |
| 2642 | /** |
Siarhei Vishniakou | 3ddecff | 2018-11-08 19:57:13 -0800 | [diff] [blame] | 2643 | * Logs basic timing information about touch events. |
| 2644 | * Reported at most every 5 minutes while device is being interacted with. |
| 2645 | * |
| 2646 | * Logged from: |
| 2647 | * frameworks/native/services/inputflinger |
| 2648 | */ |
| 2649 | message TouchEventReported { |
| 2650 | /** |
| 2651 | * The fields latency_{min|max|mean|stdev} represent minimum, maximum, mean, |
Siarhei Vishniakou | 20d23c0 | 2019-08-15 19:32:34 -0500 | [diff] [blame] | 2652 | * and the standard deviation of the time spent processing touchscreen events |
| 2653 | * in the kernel and inputflinger. The units are microseconds. |
Siarhei Vishniakou | 3ddecff | 2018-11-08 19:57:13 -0800 | [diff] [blame] | 2654 | * |
Siarhei Vishniakou | 20d23c0 | 2019-08-15 19:32:34 -0500 | [diff] [blame] | 2655 | * On supported devices, the starting point is taken during the hard interrupt inside the |
| 2656 | * kernel touch driver. On all other devices, the starting point is taken inside |
| 2657 | * the kernel's input event subsystem upon receipt of the input event. |
| 2658 | * The ending point is taken inside InputDispatcher, just after the input event |
| 2659 | * is sent to the app. |
Siarhei Vishniakou | 3ddecff | 2018-11-08 19:57:13 -0800 | [diff] [blame] | 2660 | */ |
| 2661 | // Minimum value |
| 2662 | optional float latency_min_micros = 1; |
| 2663 | // Maximum value |
| 2664 | optional float latency_max_micros = 2; |
| 2665 | // Average value |
| 2666 | optional float latency_mean_micros = 3; |
| 2667 | // Standard deviation |
| 2668 | optional float latency_stdev_micros = 4; |
Siarhei Vishniakou | ca954f9 | 2019-03-22 16:41:14 -0700 | [diff] [blame] | 2669 | // Number of touch events (input_event) in this report |
| 2670 | optional int32 count = 5; |
Siarhei Vishniakou | 3ddecff | 2018-11-08 19:57:13 -0800 | [diff] [blame] | 2671 | } |
| 2672 | |
| 2673 | /** |
Philip Quinn | 0eded62 | 2019-01-29 12:46:28 -0800 | [diff] [blame] | 2674 | * Logs gesture classification and timing information for touch events. |
| 2675 | * |
| 2676 | * Logged from: |
| 2677 | * frameworks/base/core/java/android/view/GestureDetector.java |
| 2678 | * frameworks/base/core/java/android/view/View.java |
| 2679 | */ |
| 2680 | message TouchGestureClassified { |
| 2681 | // The source of the classification (e.g. Java class name). |
| 2682 | optional string source = 1; |
| 2683 | |
| 2684 | enum Classification { |
| 2685 | UNKNOWN_CLASSIFICATION = 0; |
| 2686 | SINGLE_TAP = 1; |
| 2687 | DOUBLE_TAP = 2; |
| 2688 | LONG_PRESS = 3; |
| 2689 | DEEP_PRESS = 4; |
| 2690 | SCROLL = 5; |
| 2691 | } |
| 2692 | // The classification of the gesture. |
| 2693 | optional Classification classification = 2; |
| 2694 | |
| 2695 | // The interval from the start of a touch event stream until the |
| 2696 | // classification was made. |
| 2697 | optional int32 latency_millis = 3; |
| 2698 | |
| 2699 | // The distance from the location of the first touch event to the |
| 2700 | // location of the touch event when the classification was made. |
| 2701 | optional float displacement_px = 4; |
| 2702 | } |
| 2703 | |
| 2704 | /** |
David Chen | c28b2bb | 2017-10-24 12:52:52 -0700 | [diff] [blame] | 2705 | * Logs that a setting was updated. |
| 2706 | * Logged from: |
David Chen | bd78991 | 2018-03-16 17:19:55 -0700 | [diff] [blame] | 2707 | * frameworks/base/packages/SettingsProvider/src/com/android/providers/settings/SettingsState.java |
David Chen | c28b2bb | 2017-10-24 12:52:52 -0700 | [diff] [blame] | 2708 | * The tag and is_default allow resetting of settings to default values based on the specified |
| 2709 | * tag. See Settings#putString(ContentResolver, String, String, String, boolean) for more details. |
| 2710 | */ |
| 2711 | message SettingChanged { |
| 2712 | // The name of the setting. |
| 2713 | optional string setting = 1; |
| 2714 | |
| 2715 | // The change being imposed on this setting. May represent a number, eg "3". |
| 2716 | optional string value = 2; |
| 2717 | |
| 2718 | // The new value of this setting. For most settings, this is same as value. For some settings, |
| 2719 | // value is +X or -X where X represents an element in a set. For example, if the previous value |
| 2720 | // is A,B,C and value is -B, then new_value is A,C and prev_value is A,B,C. |
| 2721 | // The +/- feature is currently only used for location_providers_allowed. |
| 2722 | optional string new_value = 3; |
| 2723 | |
| 2724 | // The previous value of this setting. |
| 2725 | optional string prev_value = 4; |
| 2726 | |
| 2727 | // The tag used with the is_default for resetting sets of settings. This is generally null. |
| 2728 | optional string tag = 5; |
| 2729 | |
Bookatz | 9086762 | 2018-01-31 15:05:57 -0800 | [diff] [blame] | 2730 | // True if this setting with tag should be resettable. |
| 2731 | optional bool is_default = 6; |
David Chen | c28b2bb | 2017-10-24 12:52:52 -0700 | [diff] [blame] | 2732 | |
David Chen | bd78991 | 2018-03-16 17:19:55 -0700 | [diff] [blame] | 2733 | // 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] | 2734 | optional int32 user = 7; |
David Chen | bd78991 | 2018-03-16 17:19:55 -0700 | [diff] [blame] | 2735 | |
| 2736 | enum ChangeReason { |
| 2737 | UPDATED = 1; // Updated can be an insertion or an update. |
| 2738 | DELETED = 2; |
| 2739 | } |
| 2740 | optional ChangeReason reason = 8; |
David Chen | c28b2bb | 2017-10-24 12:52:52 -0700 | [diff] [blame] | 2741 | } |
Chenjie Yu | b3dda41 | 2017-10-24 13:41:59 -0700 | [diff] [blame] | 2742 | |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 2743 | /** |
Chenjie Yu | 3d4f604 | 2017-10-27 15:39:34 -0700 | [diff] [blame] | 2744 | * Logs activity going to foreground or background |
| 2745 | * |
| 2746 | * Logged from: |
| 2747 | * frameworks/base/services/core/java/com/android/server/am/ActivityRecord.java |
| 2748 | */ |
| 2749 | message ActivityForegroundStateChanged { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 2750 | optional int32 uid = 1 [(is_uid) = true]; |
Yangster-mac | 2087716 | 2017-12-22 17:19:39 -0800 | [diff] [blame] | 2751 | optional string pkg_name = 2; |
| 2752 | optional string class_name = 3; |
| 2753 | |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 2754 | enum State { |
| 2755 | BACKGROUND = 0; |
| 2756 | FOREGROUND = 1; |
Chenjie Yu | 3d4f604 | 2017-10-27 15:39:34 -0700 | [diff] [blame] | 2757 | } |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 2758 | optional State state = 4; |
Chenjie Yu | 3d4f604 | 2017-10-27 15:39:34 -0700 | [diff] [blame] | 2759 | } |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 2760 | |
| 2761 | /** |
Felix Lopez Luis | d95346a | 2018-12-12 10:32:32 +0000 | [diff] [blame] | 2762 | * Logs when a volume entered low Storage state. |
| 2763 | * Logged from: |
| 2764 | * frameworks/base/services/core/java/com/android/server/storage/DeviceStorageMonitorService.java |
| 2765 | */ |
| 2766 | message LowStorageStateChanged { |
| 2767 | // Volume that ran out of storage. |
| 2768 | optional string volume_description = 1; |
| 2769 | |
| 2770 | enum State { |
| 2771 | UNKNOWN = 0; |
| 2772 | OFF = 1; |
| 2773 | ON = 2; |
| 2774 | } |
| 2775 | optional State state = 2; |
| 2776 | } |
| 2777 | |
| 2778 | /** |
| 2779 | * Logs when an app is downgraded. |
| 2780 | * Logged from: |
| 2781 | * frameworks/base/services/core/java/com/android/server/pm/BackgroundDexOptService.java |
| 2782 | */ |
| 2783 | message AppDowngraded { |
| 2784 | optional string package_name = 1; |
| 2785 | // Size of the package (all data) before being downgraded. |
| 2786 | optional int64 size_in_bytes_before = 2; |
| 2787 | // Size of the package (all data) after being downgraded. |
| 2788 | optional int64 size_in_bytes_after = 3; |
| 2789 | |
| 2790 | optional bool aggressive = 4; |
| 2791 | } |
| 2792 | |
| 2793 | /** |
| 2794 | * Logs when an app is optimized after being downgraded. |
| 2795 | * Logged from: |
| 2796 | * frameworks/base/services/core/java/com/android/server/pm/BackgroundDexOptService.java |
| 2797 | */ |
| 2798 | message AppOptimizedAfterDowngraded { |
| 2799 | optional string package_name = 1; |
| 2800 | } |
| 2801 | |
| 2802 | /** |
Carmen Agimof | 6688a35 | 2019-01-30 19:36:04 +0000 | [diff] [blame] | 2803 | * Logs whenever an app is installed on external storage. |
| 2804 | * Logged from: |
| 2805 | frameworks/base/services/core/java/com/android/server/pm/PackageManagerService.java |
| 2806 | */ |
| 2807 | message AppInstallOnExternalStorageReported { |
| 2808 | // The type of external storage. |
| 2809 | optional android.stats.storage.ExternalStorageType storage_type = 1; |
| 2810 | // The name of the package that is installed on the sd card. |
| 2811 | optional string package_name = 2; |
| 2812 | } |
| 2813 | |
| 2814 | /** |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 2815 | * Logs when an app crashes. |
David Chen | 9e3808c | 2017-11-20 17:25:34 -0800 | [diff] [blame] | 2816 | * Logged from: |
| 2817 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
| 2818 | */ |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 2819 | message AppCrashOccurred { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 2820 | optional int32 uid = 1 [(is_uid) = true]; |
David Chen | 9e3808c | 2017-11-20 17:25:34 -0800 | [diff] [blame] | 2821 | |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 2822 | optional string event_type = 2; |
David Chen | 9e3808c | 2017-11-20 17:25:34 -0800 | [diff] [blame] | 2823 | |
| 2824 | // The name of the process. |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 2825 | // system_server if it is not by an app |
David Chen | 9e3808c | 2017-11-20 17:25:34 -0800 | [diff] [blame] | 2826 | optional string process_name = 3; |
| 2827 | |
| 2828 | // The pid if available. -1 means not available. |
David Chen | 6e3e6cb | 2018-01-03 16:14:06 -0800 | [diff] [blame] | 2829 | optional sint32 pid = 4; |
Chenjie Yu | f17bf62 | 2018-04-02 14:22:19 -0700 | [diff] [blame] | 2830 | |
| 2831 | optional string package_name = 5; |
| 2832 | |
| 2833 | enum InstantApp { |
| 2834 | UNAVAILABLE = 0; |
| 2835 | FALSE = 1; |
| 2836 | TRUE = 2; |
| 2837 | } |
| 2838 | optional InstantApp is_instant_app = 6; |
| 2839 | |
| 2840 | enum ForegroundState { |
| 2841 | UNKNOWN = 0; |
| 2842 | BACKGROUND = 1; |
| 2843 | FOREGROUND = 2; |
| 2844 | } |
| 2845 | optional ForegroundState foreground_state = 7; |
Yang Lu | 732d638 | 2018-11-05 07:53:12 -0800 | [diff] [blame] | 2846 | |
| 2847 | optional android.server.ErrorSource error_source = 8; |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 2848 | } |
David Chen | 9e3808c | 2017-11-20 17:25:34 -0800 | [diff] [blame] | 2849 | |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 2850 | /** |
| 2851 | * Logs when a WTF (What a Terrible Failure) happened. |
| 2852 | * Logged from: |
| 2853 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
| 2854 | */ |
| 2855 | message WTFOccurred { |
| 2856 | optional int32 uid = 1 [(is_uid) = true]; |
David Chen | 9e3808c | 2017-11-20 17:25:34 -0800 | [diff] [blame] | 2857 | |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 2858 | optional string tag = 2; |
David Chen | 9e3808c | 2017-11-20 17:25:34 -0800 | [diff] [blame] | 2859 | |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 2860 | // The name of the process. |
| 2861 | // system_server if it is not by an app |
| 2862 | optional string process_name = 3; |
David Chen | 6e3e6cb | 2018-01-03 16:14:06 -0800 | [diff] [blame] | 2863 | |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 2864 | // The pid if available. -1 means not available. |
| 2865 | optional sint32 pid = 4; |
Yang Lu | 732d638 | 2018-11-05 07:53:12 -0800 | [diff] [blame] | 2866 | |
| 2867 | optional android.server.ErrorSource error_source = 5; |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 2868 | } |
| 2869 | |
| 2870 | /** |
| 2871 | * Logs when system server reports low memory. |
| 2872 | * Logged from: |
| 2873 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
| 2874 | */ |
| 2875 | message LowMemReported { |
| 2876 | } |
| 2877 | |
| 2878 | /** |
| 2879 | * Logs when an app ANR (App Not Responding) occurs. |
| 2880 | * Logged from: |
| 2881 | * frameworks/base/services/core/java/com/android/server/am/AppErrors.java |
| 2882 | */ |
| 2883 | message ANROccurred { |
| 2884 | optional int32 uid = 1 [(is_uid) = true]; |
| 2885 | |
| 2886 | optional string process_name = 2; |
| 2887 | |
| 2888 | optional string short_component_name = 3; |
| 2889 | |
| 2890 | optional string reason = 4; |
Chenjie Yu | f17bf62 | 2018-04-02 14:22:19 -0700 | [diff] [blame] | 2891 | |
| 2892 | enum InstantApp { |
| 2893 | UNAVAILABLE = 0; |
| 2894 | FALSE = 1; |
| 2895 | TRUE = 2; |
| 2896 | } |
| 2897 | optional InstantApp is_instant_app = 5; |
| 2898 | |
| 2899 | enum ForegroundState { |
| 2900 | UNKNOWN = 0; |
| 2901 | BACKGROUND = 1; |
| 2902 | FOREGROUND = 2; |
| 2903 | } |
| 2904 | optional ForegroundState foreground_state = 6; |
Yang Lu | 732d638 | 2018-11-05 07:53:12 -0800 | [diff] [blame] | 2905 | |
| 2906 | optional android.server.ErrorSource error_source = 7; |
| 2907 | |
| 2908 | optional string package_name = 8; |
David Chen | 9e3808c | 2017-11-20 17:25:34 -0800 | [diff] [blame] | 2909 | } |
| 2910 | |
Bookatz | a7020bd | 2018-08-28 16:29:35 -0700 | [diff] [blame] | 2911 | /** |
| 2912 | * Logs when the vibrator state changes. |
| 2913 | * Logged from: |
| 2914 | * frameworks/base/services/core/java/com/android/server/VibratorService.java |
| 2915 | */ |
| 2916 | message VibratorStateChanged { |
| 2917 | repeated AttributionNode attribution_node = 1; |
| 2918 | |
| 2919 | enum State { |
| 2920 | OFF = 0; |
| 2921 | ON = 1; |
| 2922 | } |
| 2923 | optional State state = 2; |
| 2924 | |
| 2925 | // Duration (in milliseconds) requested to keep the vibrator on. |
| 2926 | // Only applicable for State == ON. |
| 2927 | optional int64 duration_millis = 3; |
| 2928 | } |
| 2929 | |
David Chen | 0a368b2 | 2017-12-06 16:28:16 -0800 | [diff] [blame] | 2930 | /* |
| 2931 | * Allows other apps to push events into statsd. |
| 2932 | * Logged from: |
| 2933 | * frameworks/base/core/java/android/util/StatsLog.java |
| 2934 | */ |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 2935 | message AppBreadcrumbReported { |
David Chen | 0a368b2 | 2017-12-06 16:28:16 -0800 | [diff] [blame] | 2936 | // The uid of the application that sent this custom atom. |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 2937 | optional int32 uid = 1 [(is_uid) = true]; |
David Chen | 0a368b2 | 2017-12-06 16:28:16 -0800 | [diff] [blame] | 2938 | |
| 2939 | // An arbitrary label chosen by the developer. For Android P, the label should be in [0, 16). |
| 2940 | optional int32 label = 2; |
| 2941 | |
| 2942 | // Allows applications to easily use a custom event as start/stop boundaries (ie, define custom |
| 2943 | // predicates for the metrics). |
| 2944 | enum State { |
| 2945 | UNKNOWN = 0; |
| 2946 | UNSPECIFIED = 1; // For events that are known to not represent START/STOP. |
| 2947 | STOP = 2; |
| 2948 | START = 3; |
| 2949 | } |
| 2950 | optional State state = 3; |
| 2951 | } |
| 2952 | |
David Chen | 9e3808c | 2017-11-20 17:25:34 -0800 | [diff] [blame] | 2953 | /** |
Bookatz | 7948c87 | 2018-09-04 12:58:33 -0700 | [diff] [blame] | 2954 | * Logs the wall-clock time when a significant wall-clock time shift occurs. |
| 2955 | * For example, this could be due to the user manually changing the time. |
| 2956 | * |
| 2957 | * Logged from: |
| 2958 | * frameworks/base/services/core/java/com/android/server/AlarmManagerService.java |
| 2959 | */ |
| 2960 | message WallClockTimeShifted { |
| 2961 | // New wall-clock time in milliseconds, according to System.currentTimeMillis(). |
| 2962 | optional int64 wall_clock_timestamp_millis = 1; |
| 2963 | } |
| 2964 | |
| 2965 | /** |
Bookatz | 8fcd09a | 2017-12-18 13:01:10 -0800 | [diff] [blame] | 2966 | * Logs when statsd detects an anomaly. |
| 2967 | * |
| 2968 | * Logged from: |
| 2969 | * frameworks/base/cmds/statsd/src/anomaly/AnomalyTracker.cpp |
| 2970 | */ |
| 2971 | message AnomalyDetected { |
| 2972 | // Uid that owns the config whose anomaly detection alert fired. |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 2973 | optional int32 config_uid = 1 [(is_uid) = true]; |
Bookatz | 8fcd09a | 2017-12-18 13:01:10 -0800 | [diff] [blame] | 2974 | |
Yangster-mac | 94e197c | 2018-01-02 16:03:03 -0800 | [diff] [blame] | 2975 | // Id of the config whose anomaly detection alert fired. |
| 2976 | optional int64 config_id = 2; |
Bookatz | 8fcd09a | 2017-12-18 13:01:10 -0800 | [diff] [blame] | 2977 | |
Yangster-mac | 94e197c | 2018-01-02 16:03:03 -0800 | [diff] [blame] | 2978 | // Id of the alert (i.e. name of the anomaly that was detected). |
| 2979 | optional int64 alert_id = 3; |
Bookatz | 8fcd09a | 2017-12-18 13:01:10 -0800 | [diff] [blame] | 2980 | } |
| 2981 | |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 2982 | message AppStartOccurred { |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 2983 | // The uid if available. -1 means not available. |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 2984 | optional int32 uid = 1 [(is_uid) = true]; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 2985 | |
| 2986 | // The app package name. |
| 2987 | optional string pkg_name = 2; |
| 2988 | |
| 2989 | enum TransitionType { |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 2990 | UNKNOWN = 0; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 2991 | WARM = 1; |
| 2992 | HOT = 2; |
| 2993 | COLD = 3; |
| 2994 | } |
| 2995 | // The transition type. |
| 2996 | optional TransitionType type = 3; |
| 2997 | |
| 2998 | // The activity name. |
| 2999 | optional string activity_name = 4; |
| 3000 | |
| 3001 | // The name of the calling app. Empty if not set. |
| 3002 | optional string calling_pkg_name = 5; |
| 3003 | |
| 3004 | // Whether the app is an instant app. |
| 3005 | optional bool is_instant_app = 6; |
| 3006 | |
| 3007 | // Device uptime when activity started. |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 3008 | optional int64 activity_start_millis = 7; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 3009 | |
Bookatz | 80d11a0 | 2018-01-16 10:46:35 -0800 | [diff] [blame] | 3010 | optional android.app.AppTransitionReasonEnum reason = 8; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 3011 | |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 3012 | optional int32 transition_delay_millis = 9; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 3013 | // -1 if not set. |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 3014 | optional int32 starting_window_delay_millis = 10; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 3015 | // -1 if not set. |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 3016 | optional int32 bind_application_delay_millis = 11; |
| 3017 | optional int32 windows_drawn_delay_millis = 12; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 3018 | |
| 3019 | // Empty if not set. |
| 3020 | optional string launch_token = 13; |
| 3021 | |
Calin Juravle | 759fbda | 2018-02-20 19:52:30 +0000 | [diff] [blame] | 3022 | // The compiler filter used when when the package was optimized. |
Calin Juravle | a86783b | 2018-03-21 14:25:59 -0700 | [diff] [blame] | 3023 | optional int32 package_optimization_compilation_filter = 14; |
Calin Juravle | 759fbda | 2018-02-20 19:52:30 +0000 | [diff] [blame] | 3024 | |
| 3025 | // The reason why the package was optimized. |
Calin Juravle | a86783b | 2018-03-21 14:25:59 -0700 | [diff] [blame] | 3026 | optional int32 package_optimization_compilation_reason = 15; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 3027 | } |
| 3028 | |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 3029 | message AppStartCanceled { |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 3030 | // The uid if available. -1 means not available. |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 3031 | optional int32 uid = 1 [(is_uid) = true]; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 3032 | |
| 3033 | // The app package name. |
| 3034 | optional string pkg_name = 2; |
| 3035 | |
| 3036 | enum TransitionType { |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 3037 | UNKNOWN = 0; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 3038 | WARM = 1; |
| 3039 | HOT = 2; |
| 3040 | COLD = 3; |
| 3041 | } |
| 3042 | // The transition type. |
| 3043 | optional TransitionType type = 3; |
| 3044 | |
| 3045 | // The activity name. |
| 3046 | optional string activity_name = 4; |
| 3047 | } |
| 3048 | |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 3049 | message AppStartFullyDrawn { |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 3050 | // The uid if available. -1 means not available. |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 3051 | optional int32 uid = 1 [(is_uid) = true]; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 3052 | |
| 3053 | // The app package name. |
| 3054 | optional string pkg_name = 2; |
| 3055 | |
| 3056 | enum TransitionType { |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 3057 | UNKNOWN = 0; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 3058 | WITH_BUNDLE = 1; |
| 3059 | WITHOUT_BUNDLE = 2; |
| 3060 | } |
| 3061 | // The transition type. |
| 3062 | optional TransitionType type = 3; |
| 3063 | |
| 3064 | // The activity name. |
| 3065 | optional string activity_name = 4; |
| 3066 | |
| 3067 | optional bool transition_process_running = 5; |
| 3068 | |
| 3069 | // App startup time (until call to Activity#reportFullyDrawn()). |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 3070 | optional int64 app_startup_time_millis = 6; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 3071 | } |
| 3072 | |
Bookatz | 8fcd09a | 2017-12-18 13:01:10 -0800 | [diff] [blame] | 3073 | /** |
Chenjie Yu | 52cacc6 | 2017-12-08 18:11:45 -0800 | [diff] [blame] | 3074 | * Logs a picture-in-picture action |
| 3075 | * Logged from: |
| 3076 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
| 3077 | * frameworks/base/services/core/java/com/android/server/am/ActivityStackSupervisor.java |
| 3078 | * frameworks/base/packages/SystemUI/src/com/android/systemui/pip/phone/PipTouchHandler.java |
| 3079 | */ |
| 3080 | message PictureInPictureStateChanged { |
Chenjie Yu | ae9fdf04 | 2018-02-15 10:19:32 -0800 | [diff] [blame] | 3081 | // -1 if it is not available |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 3082 | optional int32 uid = 1 [(is_uid) = true]; |
Chenjie Yu | 52cacc6 | 2017-12-08 18:11:45 -0800 | [diff] [blame] | 3083 | |
Chenjie Yu | ae9fdf04 | 2018-02-15 10:19:32 -0800 | [diff] [blame] | 3084 | optional string short_name = 2; |
Chenjie Yu | 52cacc6 | 2017-12-08 18:11:45 -0800 | [diff] [blame] | 3085 | |
Chenjie Yu | 52cacc6 | 2017-12-08 18:11:45 -0800 | [diff] [blame] | 3086 | enum State { |
| 3087 | ENTERED = 1; |
| 3088 | EXPANDED_TO_FULL_SCREEN = 2; |
| 3089 | MINIMIZED = 3; |
| 3090 | DISMISSED = 4; |
| 3091 | } |
Chenjie Yu | ae9fdf04 | 2018-02-15 10:19:32 -0800 | [diff] [blame] | 3092 | optional State state = 3; |
Chenjie Yu | 52cacc6 | 2017-12-08 18:11:45 -0800 | [diff] [blame] | 3093 | } |
| 3094 | |
| 3095 | /** |
Chenjie Yu | e890419 | 2017-12-08 19:12:57 -0800 | [diff] [blame] | 3096 | * Logs overlay action |
| 3097 | * Logged from: |
| 3098 | * services/core/java/com/android/server/wm/Session.java |
| 3099 | */ |
| 3100 | message OverlayStateChanged { |
tsaichristine | 1097864 | 2019-09-10 14:12:49 -0700 | [diff] [blame] | 3101 | optional int32 uid = 1 [(state_field_option).option = PRIMARY, (is_uid) = true]; |
Chenjie Yu | e890419 | 2017-12-08 19:12:57 -0800 | [diff] [blame] | 3102 | |
tsaichristine | 1097864 | 2019-09-10 14:12:49 -0700 | [diff] [blame] | 3103 | optional string package_name = 2 [(state_field_option).option = PRIMARY]; |
Chenjie Yu | e890419 | 2017-12-08 19:12:57 -0800 | [diff] [blame] | 3104 | |
| 3105 | optional bool using_alert_window = 3; |
| 3106 | |
| 3107 | enum State { |
| 3108 | ENTERED = 1; |
| 3109 | EXITED = 2; |
| 3110 | } |
tsaichristine | 1097864 | 2019-09-10 14:12:49 -0700 | [diff] [blame] | 3111 | optional State state = 4 [(state_field_option).option = EXCLUSIVE]; |
Chenjie Yu | e890419 | 2017-12-08 19:12:57 -0800 | [diff] [blame] | 3112 | } |
| 3113 | |
Chenjie Yu | ccfe645 | 2018-01-30 11:33:21 -0800 | [diff] [blame] | 3114 | /* |
| 3115 | * Logs foreground service starts and stops. |
| 3116 | * Note that this is not when a service starts or stops, but when it is |
| 3117 | * considered foreground. |
| 3118 | * Logged from |
| 3119 | * //frameworks/base/services/core/java/com/android/server/am/ActiveServices.java |
| 3120 | */ |
| 3121 | message ForegroundServiceStateChanged { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 3122 | optional int32 uid = 1 [(is_uid) = true]; |
Chenjie Yu | ccfe645 | 2018-01-30 11:33:21 -0800 | [diff] [blame] | 3123 | // package_name + "/" + class_name |
| 3124 | optional string short_name = 2; |
| 3125 | |
| 3126 | enum State { |
| 3127 | ENTER = 1; |
| 3128 | EXIT = 2; |
| 3129 | } |
| 3130 | optional State state = 3; |
| 3131 | } |
| 3132 | |
Chenjie Yu | e890419 | 2017-12-08 19:12:57 -0800 | [diff] [blame] | 3133 | /** |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 3134 | * Logs creation or removal of an isolated uid. Isolated uid's are temporary uid's to sandbox risky |
| 3135 | * behavior in its own uid. However, the metrics of these isolated uid's almost always should be |
| 3136 | * attributed back to the parent (host) uid. One example is Chrome. |
| 3137 | * |
| 3138 | * Logged from: |
| 3139 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
| 3140 | */ |
| 3141 | message IsolatedUidChanged { |
| 3142 | // 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] | 3143 | // 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] | 3144 | // This field is ignored when event == REMOVED. |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 3145 | optional int32 parent_uid = 1; |
| 3146 | |
| 3147 | optional int32 isolated_uid = 2; |
| 3148 | |
| 3149 | // We expect an isolated uid to be removed before if it's used for another parent uid. |
| 3150 | enum Event { |
| 3151 | REMOVED = 0; |
| 3152 | CREATED = 1; |
| 3153 | } |
| 3154 | optional Event event = 3; |
| 3155 | } |
| 3156 | |
| 3157 | /* |
| 3158 | * Logs the reception of an incoming network packet causing the main system to wake up for |
| 3159 | * processing that packet. These events are notified by the kernel via Netlink NFLOG to Netd |
| 3160 | * and processed by WakeupController.cpp. |
| 3161 | */ |
| 3162 | message PacketWakeupOccurred { |
| 3163 | // The uid owning the socket into which the packet was delivered, or -1 if the packet was |
| 3164 | // delivered nowhere. |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 3165 | optional int32 uid = 1 [(is_uid) = true]; |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 3166 | // The interface name on which the packet was received. |
| 3167 | optional string iface = 2; |
| 3168 | // The ethertype value of the packet. |
| 3169 | optional int32 ethertype = 3; |
| 3170 | // String representation of the destination MAC address of the packet. |
| 3171 | optional string destination_hardware_address = 4; |
| 3172 | // String representation of the source address of the packet if this was an IP packet. |
| 3173 | optional string source_ip = 5; |
| 3174 | // String representation of the destination address of the packet if this was an IP packet. |
| 3175 | optional string destination_ip = 6; |
| 3176 | // The value of the protocol field if this was an IPv4 packet or the value of the Next Header |
| 3177 | // field if this was an IPv6 packet. The range of possible values is the same for both IP |
| 3178 | // families. |
| 3179 | optional int32 ip_next_header = 7; |
| 3180 | // The source port if this was a TCP or UDP packet. |
| 3181 | optional int32 source_port = 8; |
| 3182 | // The destination port if this was a TCP or UDP packet. |
| 3183 | optional int32 destination_port = 9; |
| 3184 | } |
| 3185 | |
| 3186 | /* |
| 3187 | * Logs the memory stats for an app on startup. |
| 3188 | * Logged from: |
| 3189 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
| 3190 | */ |
| 3191 | message AppStartMemoryStateCaptured { |
| 3192 | // The uid if available. -1 means not available. |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 3193 | optional int32 uid = 1 [(is_uid) = true]; |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 3194 | |
| 3195 | // The process name. |
| 3196 | optional string process_name = 2; |
| 3197 | |
| 3198 | // The activity name. |
| 3199 | optional string activity_name = 3; |
| 3200 | |
| 3201 | // # of page-faults |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 3202 | optional int64 page_fault = 4; |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 3203 | |
| 3204 | // # of major page-faults |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 3205 | optional int64 page_major_fault = 5; |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 3206 | |
| 3207 | // RSS |
| 3208 | optional int64 rss_in_bytes = 6; |
| 3209 | |
| 3210 | // CACHE |
| 3211 | optional int64 cache_in_bytes = 7; |
| 3212 | |
| 3213 | // SWAP |
| 3214 | optional int64 swap_in_bytes = 8; |
| 3215 | } |
| 3216 | |
| 3217 | /* |
| 3218 | * Logs the change in Low Memory Killer Daemon (LMKD) state which is used as start/stop boundaries |
| 3219 | * for LMK event. |
| 3220 | * Logged from: |
| 3221 | * system/core/lmkd/lmkd.c |
| 3222 | */ |
| 3223 | message LmkStateChanged { |
| 3224 | enum State { |
| 3225 | UNKNOWN = 0; |
| 3226 | START = 1; |
| 3227 | STOP = 2; |
| 3228 | } |
| 3229 | optional State state = 1; |
| 3230 | } |
| 3231 | |
| 3232 | /* |
| 3233 | * Logs the event when Low Memory Killer Daemon (LMKD) kills a process to reduce memory pressure. |
| 3234 | * Logged from: |
| 3235 | * system/core/lmkd/lmkd.c |
| 3236 | */ |
| 3237 | message LmkKillOccurred { |
| 3238 | // The uid if available. -1 means not available. |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 3239 | optional int32 uid = 1 [(is_uid) = true]; |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 3240 | |
| 3241 | // The process name. |
| 3242 | optional string process_name = 2; |
| 3243 | |
| 3244 | // oom adj score. |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 3245 | optional int32 oom_adj_score = 3; |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 3246 | |
| 3247 | // # of page-faults |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 3248 | optional int64 page_fault = 4; |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 3249 | |
| 3250 | // # of major page-faults |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 3251 | optional int64 page_major_fault = 5; |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 3252 | |
| 3253 | // RSS |
| 3254 | optional int64 rss_in_bytes = 6; |
| 3255 | |
| 3256 | // CACHE |
| 3257 | optional int64 cache_in_bytes = 7; |
| 3258 | |
| 3259 | // SWAP |
| 3260 | optional int64 swap_in_bytes = 8; |
Jim Blackler | 8593d1f | 2018-11-21 15:24:48 +0000 | [diff] [blame] | 3261 | |
| 3262 | // The elapsed real time of start of the process. |
| 3263 | optional int64 process_start_time_nanos = 9; |
Suren Baghdasaryan | 1fbaa1f | 2019-03-04 11:09:31 -0800 | [diff] [blame] | 3264 | |
| 3265 | // Min oom adj score considered by lmkd. |
| 3266 | optional int32 min_oom_score = 10; |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 3267 | } |
| 3268 | |
Rajeev Kumar | 51b5460 | 2018-03-01 12:18:26 -0800 | [diff] [blame] | 3269 | /* |
| 3270 | * Logs when the ActivityManagerService detects that an app died. |
| 3271 | * |
| 3272 | * Logged from: |
| 3273 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
| 3274 | */ |
| 3275 | message AppDied { |
| 3276 | // timestamp(elapsedRealtime) of record creation |
Yangster-mac | b6b77c6 | 2018-10-12 19:33:24 -0700 | [diff] [blame] | 3277 | optional uint64 timestamp_millis = 1 [(state_field_option).option = EXCLUSIVE]; |
Rajeev Kumar | 51b5460 | 2018-03-01 12:18:26 -0800 | [diff] [blame] | 3278 | } |
| 3279 | |
Howard Ro | 21a039c | 2018-08-06 14:55:47 -0700 | [diff] [blame] | 3280 | /** |
| 3281 | * An atom for generic metrics logging. Available from Android Q. |
| 3282 | */ |
| 3283 | message GenericAtom { |
| 3284 | // The uid of the application that sent this custom atom. |
| 3285 | optional int32 uid = 1 [(is_uid) = true]; |
| 3286 | |
| 3287 | // An event_id indicates the type of event. |
Howard Ro | 9a862de | 2018-10-11 16:03:33 -0700 | [diff] [blame] | 3288 | optional android.stats.EventType event_id = 2; |
Howard Ro | 21a039c | 2018-08-06 14:55:47 -0700 | [diff] [blame] | 3289 | } |
| 3290 | |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 3291 | /** |
Will Brockman | fbaa791 | 2019-10-24 15:15:09 -0400 | [diff] [blame] | 3292 | * Atom for simple logging of user interaction and impression events, such as "the user touched |
| 3293 | * this button" or "this dialog was displayed". |
| 3294 | * Keep the UI event stream clean: don't use for system or background events. |
| 3295 | * 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] | 3296 | * |
| 3297 | * Logged from: |
| 3298 | * frameworks/base/services/core/java/com/android/server/ |
| 3299 | * frameworks/base/packages/SystemUI/src/com/android/systemui/ |
Will Brockman | fbaa791 | 2019-10-24 15:15:09 -0400 | [diff] [blame] | 3300 | */ |
| 3301 | message UiEventReported { |
| 3302 | // The event_id. |
| 3303 | optional int32 event_id = 1; |
| 3304 | // The event's source or target uid and package, if applicable. |
| 3305 | // For example, the package posting a notification, or the destination package of a share. |
| 3306 | optional int32 uid = 2 [(is_uid) = true]; |
| 3307 | optional string package_name = 3; |
Will Brockman | 12282ac | 2019-12-20 09:37:42 -0500 | [diff] [blame] | 3308 | // An identifier used to disambiguate which logs refer to a particular instance of some |
| 3309 | // UI element. Useful when there might be multiple instances simultaneously active. |
| 3310 | optional int32 instance_id = 4; |
Will Brockman | fbaa791 | 2019-10-24 15:15:09 -0400 | [diff] [blame] | 3311 | } |
| 3312 | |
| 3313 | /** |
Will Brockman | 079fdaa | 2020-01-12 16:45:03 -0500 | [diff] [blame] | 3314 | * Reports a notification was created or updated. |
| 3315 | * |
| 3316 | * Logged from: |
| 3317 | * frameworks/base/services/core/java/com/android/server/notification/ |
| 3318 | */ |
| 3319 | message NotificationReported { |
| 3320 | // The event_id (as for UiEventReported). |
| 3321 | optional int32 event_id = 1; |
| 3322 | // The notifying app's uid and package. |
| 3323 | optional int32 uid = 2 [(is_uid) = true]; |
| 3324 | optional string package_name = 3; |
| 3325 | // A small system-assigned identifier for the notification. |
| 3326 | // Locally probably-unique, but expect collisions across users and/or days. |
| 3327 | optional int32 instance_id = 4; |
| 3328 | // The app-assigned notification ID and tag |
| 3329 | optional int32 notification_id = 5; |
| 3330 | optional string notification_tag = 6; |
| 3331 | optional string channel_id = 7; // App-assigned channel ID |
| 3332 | |
| 3333 | // Grouping information |
| 3334 | optional string group_id = 8; // Group the notification currently belongs to |
| 3335 | optional int32 group_instance_id = 9; // Instance_id of the group-summary notification |
| 3336 | optional bool is_group_summary = 10; // Tags the group-summary notification |
| 3337 | |
| 3338 | // Attributes |
| 3339 | optional string category = 11; // App-assigned notification category (API-defined strings) |
| 3340 | optional int32 style = 12; // App-assigned notification style |
| 3341 | optional int32 num_people = 13; // Number of Person records attached to the notification |
| 3342 | |
| 3343 | // Ordering, importance and interruptiveness |
| 3344 | |
| 3345 | optional int32 position = 14; // Position in NotificationManager's list |
| 3346 | |
| 3347 | optional android.stats.sysui.NotificationImportance importance = 15; |
| 3348 | optional int32 alerting = 16; // Bitfield, 1=buzz 2=beep 4=blink |
| 3349 | |
| 3350 | enum NotificationImportanceExplanation { |
| 3351 | IMPORTANCE_EXPLANATION_UNKNOWN = 0; |
| 3352 | IMPORTANCE_EXPLANATION_APP = 1; // App-specified channel importance. |
| 3353 | IMPORTANCE_EXPLANATION_USER = 2; // User-specified channel importance. |
| 3354 | IMPORTANCE_EXPLANATION_ASST = 3; // Notification Assistant override. |
| 3355 | IMPORTANCE_EXPLANATION_SYSTEM = 4; // System override. |
| 3356 | // Like _APP, but based on pre-channels priority signal. |
| 3357 | IMPORTANCE_EXPLANATION_APP_PRE_CHANNELS = 5; |
| 3358 | } |
| 3359 | |
| 3360 | optional NotificationImportanceExplanation importance_source = 17; |
| 3361 | optional android.stats.sysui.NotificationImportance importance_initial = 18; |
| 3362 | optional NotificationImportanceExplanation importance_initial_source = 19; |
| 3363 | optional android.stats.sysui.NotificationImportance importance_asst = 20; |
| 3364 | optional int32 assistant_hash = 21; |
| 3365 | optional float assistant_ranking_score = 22; |
| 3366 | } |
| 3367 | |
| 3368 | message Notification { |
| 3369 | // The notifying app's uid and package. |
| 3370 | optional int32 uid = 1 [(is_uid) = true]; |
| 3371 | optional string package_name = 2; |
| 3372 | // A small system-assigned identifier for the notification. |
| 3373 | optional int32 instance_id = 3; |
| 3374 | |
| 3375 | // Grouping information. |
| 3376 | optional int32 group_instance_id = 4; |
| 3377 | optional bool is_group_summary = 5; |
| 3378 | |
| 3379 | // The section of the shade that the notification is in. |
| 3380 | // See NotificationSectionsManager.PriorityBucket. |
| 3381 | enum NotificationSection { |
| 3382 | SECTION_UNKNOWN = 0; |
| 3383 | SECTION_PEOPLE = 1; |
| 3384 | SECTION_ALERTING = 2; |
| 3385 | SECTION_SILENT = 3; |
| 3386 | } |
| 3387 | optional NotificationSection section = 6; |
| 3388 | } |
| 3389 | |
| 3390 | message NotificationList { |
| 3391 | repeated Notification notifications = 1; // An ordered sequence of notifications. |
| 3392 | } |
| 3393 | |
| 3394 | /** |
| 3395 | * Reports a notification panel was displayed, e.g. from the lockscreen or status bar. |
| 3396 | * |
| 3397 | * Logged from: |
| 3398 | * frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/notification/ |
| 3399 | */ |
| 3400 | message NotificationPanelReported { |
| 3401 | // The event_id (as for UiEventReported). |
| 3402 | optional int32 event_id = 1; |
| 3403 | optional int32 num_notifications = 2; |
| 3404 | // The notifications in the panel, in the order that they appear there. |
| 3405 | optional NotificationList notifications = 3 [(log_mode) = MODE_BYTES]; |
| 3406 | } |
| 3407 | |
| 3408 | /** |
| 3409 | * Reports a notification channel, or channel group, was created, updated, or deleted. |
| 3410 | * |
| 3411 | * Logged from: |
| 3412 | * frameworks/base/services/core/java/com/android/server/notification/ |
| 3413 | */ |
| 3414 | message NotificationChannelModified { |
| 3415 | // The event_id (as for UiEventReported). |
| 3416 | optional int32 event_id = 1; |
| 3417 | // The notifying app's uid and package. |
| 3418 | optional int32 uid = 2 [(is_uid) = true]; |
| 3419 | optional string package_name = 3; |
| 3420 | // App-assigned notification channel ID or channel-group ID |
| 3421 | optional string channel_id = 4; |
| 3422 | // Previous importance setting, if applicable |
| 3423 | optional android.stats.sysui.NotificationImportance old_importance = 5; |
| 3424 | // New importance setting |
| 3425 | optional android.stats.sysui.NotificationImportance importance = 6; |
| 3426 | } |
| 3427 | |
| 3428 | |
| 3429 | /** |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 3430 | * Logs when a biometric acquire event occurs. |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 3431 | * |
| 3432 | * Logged from: |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 3433 | * frameworks/base/services/core/java/com/android/server/biometrics |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 3434 | */ |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 3435 | message BiometricAcquired { |
| 3436 | // Biometric modality that was acquired. |
| 3437 | optional android.hardware.biometrics.ModalityEnum modality = 1; |
| 3438 | // The associated user. Eg: 0 for owners, 10+ for others. Defined in android/os/UserHandle.java. |
| 3439 | optional int32 user = 2; |
| 3440 | // If this acquire is for a crypto operation. e.g. Secure purchases, unlock password storage. |
| 3441 | optional bool is_crypto = 3; |
| 3442 | // Action that the device is performing. Acquired messages are only expected for enroll and |
| 3443 | // authenticate. Other actions may indicate an error. |
| 3444 | optional android.hardware.biometrics.ActionEnum action = 4; |
| 3445 | // The client that this acquisition was received for. |
| 3446 | optional android.hardware.biometrics.ClientEnum client = 5; |
| 3447 | // Acquired constants, e.g. ACQUIRED_GOOD. See constants defined by <Biometric>Manager. |
| 3448 | optional int32 acquire_info = 6; |
| 3449 | // Vendor-specific acquire info. Valid only if acquire_info == ACQUIRED_VENDOR. |
| 3450 | optional int32 acquire_info_vendor = 7; |
joshmccloskey | 1fad0f6 | 2019-04-01 13:32:53 -0700 | [diff] [blame] | 3451 | // Dictates if this message should trigger additional debugging. |
| 3452 | optional bool debug = 8; |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 3453 | } |
| 3454 | |
| 3455 | /** |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 3456 | * Logs when a biometric authentication event occurs. |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 3457 | * |
| 3458 | * Logged from: |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 3459 | * frameworks/base/services/core/java/com/android/server/biometrics |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 3460 | */ |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 3461 | message BiometricAuthenticated { |
| 3462 | // Biometric modality that was used. |
| 3463 | optional android.hardware.biometrics.ModalityEnum modality = 1; |
| 3464 | // The associated user. Eg: 0 for owners, 10+ for others. Defined in android/os/UserHandle.java |
| 3465 | optional int32 user = 2; |
| 3466 | // If this authentication is for a crypto operation. e.g. Secure purchases, unlock password |
| 3467 | // storage. |
| 3468 | optional bool is_crypto = 3; |
| 3469 | // The client that this acquisition was received for. |
| 3470 | optional android.hardware.biometrics.ClientEnum client = 4; |
Kevin Chyn | db77e13 | 2019-01-29 13:30:41 -0800 | [diff] [blame] | 3471 | // If authentication requires user confirmation. See BiometricPrompt's |
| 3472 | // setRequireConfirmation(bool) method. |
| 3473 | optional bool require_confirmation = 5; |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 3474 | |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 3475 | enum State { |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 3476 | UNKNOWN = 0; |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 3477 | REJECTED = 1; |
| 3478 | PENDING_CONFIRMATION = 2; |
| 3479 | CONFIRMED = 3; |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 3480 | } |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 3481 | |
| 3482 | // State of the current auth attempt. |
Kevin Chyn | db77e13 | 2019-01-29 13:30:41 -0800 | [diff] [blame] | 3483 | optional State state = 6; |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 3484 | // Time it took to authenticate. For BiometricPrompt where setRequireConfirmation(false) is |
| 3485 | // specified and supported by the biometric modality, this is from the first ACQUIRED_GOOD to |
| 3486 | // AUTHENTICATED. for setRequireConfirmation(true), this is from PENDING_CONFIRMATION to |
| 3487 | // CONFIRMED. |
Kevin Chyn | db77e13 | 2019-01-29 13:30:41 -0800 | [diff] [blame] | 3488 | optional int64 latency_millis = 7; |
joshmccloskey | 1fad0f6 | 2019-04-01 13:32:53 -0700 | [diff] [blame] | 3489 | // Dictates if this message should trigger additional debugging. |
| 3490 | optional bool debug = 8; |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 3491 | } |
| 3492 | |
| 3493 | /** |
| 3494 | * Logs when a biometric error occurs. |
| 3495 | * |
| 3496 | * Logged from: |
| 3497 | * frameworks/base/services/core/java/com/android/server/biometrics |
| 3498 | */ |
| 3499 | message BiometricErrorOccurred { |
| 3500 | // Biometric modality that was used. |
| 3501 | optional android.hardware.biometrics.ModalityEnum modality = 1; |
| 3502 | // The associated user. Eg: 0 for owners, 10+ for others. Defined in android/os/UserHandle.java |
| 3503 | optional int32 user = 2; |
| 3504 | // If this error is for a crypto operation. e.g. Secure purchases, unlock password storage. |
| 3505 | optional bool is_crypto = 3; |
| 3506 | // Action that the device is performing. |
| 3507 | optional android.hardware.biometrics.ActionEnum action = 4; |
| 3508 | // The client that this acquisition was received for. |
| 3509 | optional android.hardware.biometrics.ClientEnum client = 5; |
| 3510 | // Error constants. See constants defined by <Biometric>Manager. Enums won't work since errors |
| 3511 | // are unique to modality. |
| 3512 | optional int32 error_info = 6; |
| 3513 | // Vendor-specific error info. Valid only if acquire_info == ACQUIRED_VENDOR. These are defined |
| 3514 | // by the vendor and not specified by the HIDL interface. |
| 3515 | optional int32 error_info_vendor = 7; |
joshmccloskey | 1fad0f6 | 2019-04-01 13:32:53 -0700 | [diff] [blame] | 3516 | // Dictates if this message should trigger additional debugging. |
| 3517 | optional bool debug = 8; |
Kevin Chyn | 7fca236 | 2019-06-20 17:20:42 -0700 | [diff] [blame] | 3518 | // Time spent during the authentication attempt. |
| 3519 | optional int64 latency_millis = 9; |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 3520 | } |
| 3521 | |
| 3522 | /** |
Kevin Chyn | e5a37fb | 2019-02-08 13:10:36 -0800 | [diff] [blame] | 3523 | * Logs when a system health issue is detected. |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 3524 | * Logged from: |
| 3525 | * frameworks/base/services/core/java/com/android/server/biometrics |
| 3526 | */ |
Kevin Chyn | e5a37fb | 2019-02-08 13:10:36 -0800 | [diff] [blame] | 3527 | message BiometricSystemHealthIssueDetected { |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 3528 | // Biometric modality. |
| 3529 | optional android.hardware.biometrics.ModalityEnum modality = 1; |
Kevin Chyn | e5a37fb | 2019-02-08 13:10:36 -0800 | [diff] [blame] | 3530 | // Type of issue detected. |
| 3531 | optional android.hardware.biometrics.IssueEnum issue = 2; |
joshmccloskey | 1fad0f6 | 2019-04-01 13:32:53 -0700 | [diff] [blame] | 3532 | // Dictates if this message should trigger additional debugging. |
| 3533 | optional bool debug = 3; |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 3534 | } |
Howard Ro | 688ae18 | 2018-09-25 00:09:36 -0700 | [diff] [blame] | 3535 | |
joshmccloskey | 6f952b2 | 2019-03-25 20:59:35 -0700 | [diff] [blame] | 3536 | /** |
| 3537 | * Logs when a biometric enrollment occurs. |
| 3538 | * |
| 3539 | * Logged from: |
| 3540 | * frameworks/base/services/core/java/com/android/server/biometrics |
| 3541 | */ |
| 3542 | message BiometricEnrolled { |
| 3543 | // Biometric modality that was used. |
| 3544 | optional android.hardware.biometrics.ModalityEnum modality = 1; |
| 3545 | // The associated user. Eg: 0 for owners, 10+ for others. Defined in android/os/UserHandle.java |
| 3546 | optional int32 user = 2; |
| 3547 | // The amount of time the enrollment took in milliseconds. |
| 3548 | optional int64 latency_millis = 3; |
| 3549 | // Whether or not the enrollment was successful. |
| 3550 | optional bool success = 4; |
| 3551 | } |
| 3552 | |
Chenjie Yu | ae9dfac | 2018-10-25 16:06:56 -0700 | [diff] [blame] | 3553 | /* |
Tej Singh | 0d17695 | 2019-01-16 19:10:54 -0800 | [diff] [blame] | 3554 | * 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] | 3555 | */ |
Tej Singh | 0d17695 | 2019-01-16 19:10:54 -0800 | [diff] [blame] | 3556 | message FlagFlipUpdateOccurred { |
| 3557 | // If the event is from a flag config package, specify the package name. |
| 3558 | optional string flag_flip_package_name = 1; |
| 3559 | |
| 3560 | // The order id of the package |
| 3561 | optional int64 order_id = 2; |
Yangster-mac | b89807e | 2018-11-15 21:10:57 -0800 | [diff] [blame] | 3562 | } |
| 3563 | |
Chenjie Yu | 6b1667c | 2019-01-18 10:09:33 -0800 | [diff] [blame] | 3564 | /** |
| 3565 | * Potential experiment ids that goes with a train install. |
| 3566 | */ |
| 3567 | message TrainExperimentIds { |
| 3568 | repeated int64 experiment_id = 1; |
| 3569 | } |
| 3570 | |
Yangster-mac | b89807e | 2018-11-15 21:10:57 -0800 | [diff] [blame] | 3571 | /* |
| 3572 | * Logs when a binary push state changes. |
Chenjie Yu | 8366c71 | 2019-01-16 20:48:30 -0800 | [diff] [blame] | 3573 | * Logged by the installer via public api. |
Yangster-mac | b89807e | 2018-11-15 21:10:57 -0800 | [diff] [blame] | 3574 | */ |
| 3575 | message BinaryPushStateChanged { |
Chenjie Yu | 8366c71 | 2019-01-16 20:48:30 -0800 | [diff] [blame] | 3576 | // Name of the train. |
| 3577 | optional string train_name = 1; |
| 3578 | // Version code for a "train" of packages that need to be installed atomically |
| 3579 | optional int64 train_version_code = 2; |
| 3580 | // After installation of this package, device requires a restart. |
| 3581 | optional bool requires_staging = 3; |
| 3582 | // Rollback should be enabled for this install. |
| 3583 | optional bool rollback_enabled = 4; |
| 3584 | // Requires low latency monitoring if possible. |
| 3585 | optional bool requires_low_latency_monitor = 5; |
| 3586 | |
Yangster-mac | b89807e | 2018-11-15 21:10:57 -0800 | [diff] [blame] | 3587 | enum State { |
Chenjie Yu | 8366c71 | 2019-01-16 20:48:30 -0800 | [diff] [blame] | 3588 | UNKNOWN = 0; |
| 3589 | INSTALL_REQUESTED = 1; |
| 3590 | INSTALL_STARTED = 2; |
| 3591 | INSTALL_STAGED_NOT_READY = 3; |
| 3592 | INSTALL_STAGED_READY = 4; |
| 3593 | INSTALL_SUCCESS = 5; |
Tej Singh | 403fe47 | 2019-04-30 12:54:21 -0700 | [diff] [blame] | 3594 | // Replaced by INSTALL_FAILURE_DOWNLOAD, INSTALL_FAILURE_STATE_MISMATCH, |
| 3595 | // and INSTALL_FAILURE_COMMIT. |
| 3596 | INSTALL_FAILURE = 6 [deprecated = true]; |
| 3597 | // 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] | 3598 | INSTALL_CANCELLED = 7; |
| 3599 | INSTALLER_ROLLBACK_REQUESTED = 8; |
Muhammad Qureshi | f4ca824 | 2019-03-01 09:20:15 -0800 | [diff] [blame] | 3600 | INSTALLER_ROLLBACK_INITIATED = 9; |
| 3601 | INSTALLER_ROLLBACK_INITIATED_FAILURE = 10; |
| 3602 | INSTALLER_ROLLBACK_STAGED = 11; |
| 3603 | INSTALLER_ROLLBACK_STAGED_FAILURE = 12; |
| 3604 | INSTALLER_ROLLBACK_BOOT_TRIGGERED = 13; |
| 3605 | INSTALLER_ROLLBACK_BOOT_TRIGGERED_FAILURE = 14; |
| 3606 | INSTALLER_ROLLBACK_SUCCESS = 15; |
| 3607 | INSTALLER_ROLLBACK_FAILURE = 16; |
Howard Ro | 174ed56 | 2019-04-07 22:17:58 -0700 | [diff] [blame] | 3608 | INSTALLER_ROLLBACK_STAGED_CANCEL_REQUESTED = 17; |
| 3609 | INSTALLER_ROLLBACK_STAGED_CANCEL_SUCCESS = 18; |
| 3610 | INSTALLER_ROLLBACK_STAGED_CANCEL_FAILURE = 19; |
| 3611 | INSTALL_STAGED_CANCEL_REQUESTED = 20; |
| 3612 | INSTALL_STAGED_CANCEL_SUCCESS = 21; |
| 3613 | INSTALL_STAGED_CANCEL_FAILURE = 22; |
Tej Singh | 403fe47 | 2019-04-30 12:54:21 -0700 | [diff] [blame] | 3614 | INSTALL_FAILURE_DOWNLOAD = 23; |
| 3615 | INSTALL_FAILURE_STATE_MISMATCH = 24; |
| 3616 | INSTALL_FAILURE_COMMIT = 25; |
Jonathan Nguyen | 5886a71 | 2020-01-16 10:34:21 -0800 | [diff] [blame] | 3617 | REBOOT_TRIGGERED = 26; |
Yangster-mac | b89807e | 2018-11-15 21:10:57 -0800 | [diff] [blame] | 3618 | } |
Chenjie Yu | 8366c71 | 2019-01-16 20:48:30 -0800 | [diff] [blame] | 3619 | optional State state = 6; |
Chenjie Yu | 6b1667c | 2019-01-18 10:09:33 -0800 | [diff] [blame] | 3620 | // Possible experiment ids for monitoring this push. |
| 3621 | optional TrainExperimentIds experiment_ids = 7 [(log_mode) = MODE_BYTES]; |
| 3622 | // user id |
| 3623 | optional int32 user_id = 8; |
Jonathan Nguyen | 5886a71 | 2020-01-16 10:34:21 -0800 | [diff] [blame] | 3624 | optional int32 reason = 9; |
Yangster-mac | b89807e | 2018-11-15 21:10:57 -0800 | [diff] [blame] | 3625 | } |
| 3626 | |
Tej Singh | c920308 | 2019-05-03 13:42:23 -0700 | [diff] [blame] | 3627 | /* Test atom, is not logged anywhere */ |
| 3628 | message TestAtomReported { |
| 3629 | repeated AttributionNode attribution_node = 1; |
| 3630 | optional int32 int_field = 2; |
| 3631 | optional int64 long_field = 3; |
| 3632 | optional float float_field = 4; |
| 3633 | optional string string_field = 5; |
| 3634 | optional bool boolean_field = 6; |
| 3635 | enum State { |
| 3636 | UNKNOWN = 0; |
| 3637 | OFF = 1; |
| 3638 | ON = 2; |
| 3639 | } |
| 3640 | optional State state = 7; |
| 3641 | optional TrainExperimentIds bytes_field = 8 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 3642 | } |
| 3643 | |
Maggie White | fc1aa59 | 2018-11-28 21:55:23 -0800 | [diff] [blame] | 3644 | /** Represents USB port overheat event. */ |
| 3645 | message UsbPortOverheatEvent { |
| 3646 | /* Temperature of USB port at USB plug event, in 1/10ths of degree C. */ |
| 3647 | optional int32 plug_temperature_deci_c = 1; |
| 3648 | |
| 3649 | /* Maximum temperature of USB port during overheat event, in 1/10ths of degree C. */ |
| 3650 | optional int32 max_temperature_deci_c = 2; |
| 3651 | |
| 3652 | /* Time between USB plug event and overheat threshold trip, in seconds. */ |
| 3653 | optional int32 time_to_overheat_secs = 3; |
| 3654 | |
| 3655 | /* Time between overheat threshold trip and hysteresis, in seconds. */ |
| 3656 | optional int32 time_to_hysteresis_secs = 4; |
| 3657 | |
| 3658 | /* Time between hysteresis and active mitigation ending, in seconds. */ |
| 3659 | optional int32 time_to_inactive_secs = 5; |
| 3660 | }; |
| 3661 | |
Maggie White | 8735b85 | 2019-01-18 11:40:49 -0800 | [diff] [blame] | 3662 | /** |
| 3663 | * Logs total effective full charge and discharge cycles on a battery. |
| 3664 | * Here are some examples of one effective cycle: |
| 3665 | * 1) the battery charges from 0% to 100% and drains back to 0%, |
| 3666 | * 2) charging from 50% to 100% and draining back to 50% twice. |
| 3667 | * Pulled from: |
| 3668 | * frameworks/base/cmds/statsd/src/external/ResourceHealthManagerPuller.cpp |
| 3669 | */ |
| 3670 | message BatteryCycleCount { |
| 3671 | /* Number of total charge and discharge cycles on the system battery. */ |
| 3672 | optional int32 cycle_count = 1; |
| 3673 | } |
| 3674 | |
Carmen Agimof | 35f7f6f | 2019-02-05 18:19:21 +0000 | [diff] [blame] | 3675 | /** |
Carmen Agimof | 12dec12 | 2019-03-06 16:14:38 +0000 | [diff] [blame] | 3676 | * Logs that external storage is mounted and information about it, the storage type (sd card/usb/ |
| 3677 | * others), its type (public or private) and the size in bytes. |
Carmen Agimof | 35f7f6f | 2019-02-05 18:19:21 +0000 | [diff] [blame] | 3678 | * Pulled from: |
| 3679 | * StatsCompanionService |
| 3680 | */ |
| 3681 | |
Carmen Agimof | 12dec12 | 2019-03-06 16:14:38 +0000 | [diff] [blame] | 3682 | message ExternalStorageInfo { |
Carmen Agimof | 35f7f6f | 2019-02-05 18:19:21 +0000 | [diff] [blame] | 3683 | |
Carmen Agimof | 12dec12 | 2019-03-06 16:14:38 +0000 | [diff] [blame] | 3684 | enum VolumeType { |
Carmen Agimof | 35f7f6f | 2019-02-05 18:19:21 +0000 | [diff] [blame] | 3685 | UNKNOWN = 0; |
Carmen Agimof | 12dec12 | 2019-03-06 16:14:38 +0000 | [diff] [blame] | 3686 | PUBLIC = 1; |
| 3687 | PRIVATE = 2; |
| 3688 | OTHER = 3; |
Carmen Agimof | 35f7f6f | 2019-02-05 18:19:21 +0000 | [diff] [blame] | 3689 | } |
| 3690 | |
Carmen Agimof | 12dec12 | 2019-03-06 16:14:38 +0000 | [diff] [blame] | 3691 | // The type of external storage. |
| 3692 | optional android.stats.storage.ExternalStorageType storage_type = 1; |
| 3693 | // Type of the volume: TYPE_PUBLIC if portable and TYPE_PRIVATE if internal. |
| 3694 | optional VolumeType volume_type = 2; |
Carmen Agimof | 35f7f6f | 2019-02-05 18:19:21 +0000 | [diff] [blame] | 3695 | // Total size of the sd card in bytes. |
Carmen Agimof | 12dec12 | 2019-03-06 16:14:38 +0000 | [diff] [blame] | 3696 | optional int64 size_bytes = 3; |
Carmen Agimof | 35f7f6f | 2019-02-05 18:19:21 +0000 | [diff] [blame] | 3697 | } |
| 3698 | |
Yangster-mac | b89807e | 2018-11-15 21:10:57 -0800 | [diff] [blame] | 3699 | /* |
Chenjie Yu | ae9dfac | 2018-10-25 16:06:56 -0700 | [diff] [blame] | 3700 | * Logs when a connection becomes available and lost. |
| 3701 | * Logged in StatsCompanionService.java |
| 3702 | */ |
| 3703 | message ConnectivityStateChanged { |
Chenjie Yu | 75b3c49 | 2018-10-06 21:45:19 -0700 | [diff] [blame] | 3704 | // Id of the network. |
| 3705 | optional int32 net_id = 1; |
| 3706 | |
| 3707 | enum State { |
| 3708 | UNKNOWN = 0; |
| 3709 | CONNECTED = 1; |
| 3710 | DISCONNECTED = 2; |
| 3711 | } |
| 3712 | // Connected state of a network. |
| 3713 | optional State state = 2; |
| 3714 | } |
| 3715 | |
| 3716 | /** |
| 3717 | * Logs when a service starts and stops. |
| 3718 | * Logged from: |
| 3719 | * services/core/java/com/android/server/am/ActiveServices.java |
| 3720 | */ |
| 3721 | message ServiceStateChanged { |
| 3722 | |
| 3723 | optional int32 uid = 1 [(is_uid) = true]; |
| 3724 | |
| 3725 | optional string package_name = 2; |
| 3726 | |
| 3727 | optional string service_name = 3; |
Chenjie Yu | ae9dfac | 2018-10-25 16:06:56 -0700 | [diff] [blame] | 3728 | |
| 3729 | enum State { |
Chenjie Yu | 75b3c49 | 2018-10-06 21:45:19 -0700 | [diff] [blame] | 3730 | START = 1; |
| 3731 | STOP = 2; |
Chenjie Yu | ae9dfac | 2018-10-25 16:06:56 -0700 | [diff] [blame] | 3732 | } |
Chenjie Yu | 75b3c49 | 2018-10-06 21:45:19 -0700 | [diff] [blame] | 3733 | |
| 3734 | optional State state = 4; |
| 3735 | } |
| 3736 | |
| 3737 | /** |
| 3738 | * Logs when a service is launched. |
| 3739 | * Logged from: |
| 3740 | * services/core/java/com/android/server/am/ActiveServices.java |
| 3741 | */ |
| 3742 | message ServiceLaunchReported { |
| 3743 | |
| 3744 | optional int32 uid = 1 [(is_uid) = true]; |
| 3745 | |
| 3746 | optional string package_name = 2; |
| 3747 | |
| 3748 | optional string service_name = 3; |
Chenjie Yu | ae9dfac | 2018-10-25 16:06:56 -0700 | [diff] [blame] | 3749 | } |
Howard Ro | 688ae18 | 2018-09-25 00:09:36 -0700 | [diff] [blame] | 3750 | |
Andrei Onea | 4ad6d0c | 2019-02-08 13:54:12 +0000 | [diff] [blame] | 3751 | /** |
| 3752 | * Logs when a hidden API is used. |
| 3753 | * |
| 3754 | * Logged from: |
| 3755 | * libcore/libart/src/main/java/dalvik/system/VMRuntime.java |
| 3756 | */ |
| 3757 | message HiddenApiUsed { |
| 3758 | // The uid of the app making the hidden access. |
| 3759 | optional int32 uid = 1 [(is_uid) = true]; |
| 3760 | |
| 3761 | // Signature of the method or field accessed. |
| 3762 | optional string signature = 2; |
| 3763 | |
| 3764 | enum AccessMethod { |
| 3765 | NONE = 0; |
| 3766 | REFLECTION = 1; |
| 3767 | JNI = 2; |
| 3768 | LINKING = 3; |
| 3769 | } |
| 3770 | |
| 3771 | // Type of access. |
| 3772 | optional AccessMethod access_method = 3; |
| 3773 | |
| 3774 | // Whether the access was prevented or not. |
| 3775 | optional bool access_denied = 4; |
| 3776 | } |
| 3777 | |
Fabian Kozynski | bfd6d85 | 2019-02-15 15:08:16 -0500 | [diff] [blame] | 3778 | /** |
| 3779 | * Logs user interaction with the Privacy Indicators added in Q. In particular: |
| 3780 | * - When user sees privacy chip |
| 3781 | * - When user clicks privacy chip |
| 3782 | * - How does the user exit the Privacy Dialog |
| 3783 | * Logged from: |
Fabian Kozynski | bfd6d85 | 2019-02-15 15:08:16 -0500 | [diff] [blame] | 3784 | * packages/SystemUI/src/com/android/systemui/qs/QuickStatusBarHeader.java |
| 3785 | */ |
| 3786 | message PrivacyIndicatorsInteracted { |
| 3787 | |
| 3788 | enum Type { |
| 3789 | UNKNOWN = 0; |
| 3790 | CHIP_VIEWED = 1; |
| 3791 | CHIP_CLICKED = 2; |
| 3792 | DIALOG_PRIVACY_SETTINGS = 3; |
| 3793 | DIALOG_DISMISS = 4; |
| 3794 | DIALOG_LINE_ITEM = 5; |
| 3795 | } |
| 3796 | |
| 3797 | optional Type type = 1 [(state_field_option).option = EXCLUSIVE]; |
| 3798 | |
| 3799 | // Used if the type is LINE_ITEM |
| 3800 | optional string package_name = 2; |
| 3801 | } |
| 3802 | |
Carmen Agimof | 6dcc503 | 2019-03-01 16:20:09 +0000 | [diff] [blame] | 3803 | /** |
| 3804 | * Logs information about a package that is moved from the internal to external storage and vice |
| 3805 | * versa. |
| 3806 | * It logs the package name, the type of the external storage where the package is installed |
| 3807 | * (if moved to external storage, or UNKNOWN if moved to internal storage), |
| 3808 | * and the move type: if it's from internal to external or the other way around. |
| 3809 | * |
| 3810 | * Logged from: |
| 3811 | frameworks/base/services/core/java/com/android/server/pm/PackageManagerService.java |
| 3812 | */ |
| 3813 | message AppMovedStorageReported { |
| 3814 | enum MoveType { |
| 3815 | UNKNOWN = 0; |
| 3816 | TO_EXTERNAL = 1; |
| 3817 | TO_INTERNAL = 2; |
| 3818 | } |
| 3819 | // The type of the external storage. |
| 3820 | optional android.stats.storage.ExternalStorageType external_storage_type = 1; |
| 3821 | // The type of move. |
| 3822 | optional MoveType move_type = 2; |
| 3823 | // The name of the package that was moved. |
| 3824 | optional string package_name = 3; |
| 3825 | } |
| 3826 | |
jianjin | 8f2dee0 | 2019-03-29 14:03:08 -0700 | [diff] [blame] | 3827 | /** |
| 3828 | * Logs when system server watchdog occurs. |
| 3829 | * Logged from: |
| 3830 | * frameworks/base/services/core/java/com/android/server/Watchdog.java |
| 3831 | */ |
| 3832 | message SystemServerWatchdogOccurred { |
| 3833 | optional string subject = 1; |
| 3834 | } |
| 3835 | |
| 3836 | /** |
| 3837 | * Logs when new file added to tombstones. |
| 3838 | * Logged from: |
| 3839 | * frameworks/base/core/java/com/android/server/BootReceiver.java |
| 3840 | */ |
| 3841 | message TombStoneOccurred { |
| 3842 | } |
| 3843 | |
Hai Zhang | 5d3328d | 2019-04-13 21:25:06 +0800 | [diff] [blame] | 3844 | /* |
| 3845 | * Information about a role request |
| 3846 | * |
| 3847 | * Logged from: |
| 3848 | * packages/apps/PermissionController/src/com/android/packageinstaller/role/ui/RequestRoleFragment.java |
| 3849 | */ |
| 3850 | message RoleRequestResultReported { |
| 3851 | // UID of application requesting the role |
| 3852 | optional int32 requesting_uid = 1; |
| 3853 | |
| 3854 | // Package name of application requesting the role |
| 3855 | optional string requesting_package_name = 2; |
| 3856 | |
| 3857 | // The role to be granted |
| 3858 | optional string role_name = 3; |
| 3859 | |
| 3860 | // The count of applications qualifying for the role |
| 3861 | optional int32 qualifying_count = 4; |
| 3862 | |
| 3863 | // UID of application current granted the role |
| 3864 | optional int32 current_uid = 5; |
| 3865 | |
| 3866 | // Package name of application current granted the role |
| 3867 | optional string current_package_name = 6; |
| 3868 | |
| 3869 | // UID of another application that user chose to grant the role to, instead of the requesting |
| 3870 | // application |
| 3871 | optional int32 granted_another_uid = 7; |
| 3872 | |
| 3873 | // Package name of another application that user chose to grant the role to, instead of the |
| 3874 | // requesting application |
| 3875 | optional string granted_another_package_name = 8; |
| 3876 | |
| 3877 | enum Result { |
| 3878 | UNDEFINED = 0; |
| 3879 | // role request was ignored |
| 3880 | IGNORED = 1; |
| 3881 | // role request was ignored because it's already granted |
| 3882 | IGNORED_ALREADY_GRANTED = 2; |
| 3883 | // role request was ignored because the application isn't qualified |
| 3884 | IGNORED_NOT_QUALIFIED = 3; |
| 3885 | // role request was ignored because user said it should be always denied |
| 3886 | IGNORED_USER_ALWAYS_DENIED = 4; |
| 3887 | // role was granted by user action |
| 3888 | USER_GRANTED = 5; |
| 3889 | // role was denied by user action |
| 3890 | USER_DENIED = 6; |
| 3891 | // role was denied by user granting another application the role |
| 3892 | USER_DENIED_GRANTED_ANOTHER = 7; |
| 3893 | // role was denied and set to be always denied by the user |
| 3894 | USER_DENIED_WITH_ALWAYS = 8; |
| 3895 | } |
| 3896 | // The result of the role request |
| 3897 | optional Result result = 9; |
| 3898 | } |
| 3899 | |
Mark Tabry | a824a64 | 2019-11-05 12:26:12 -0800 | [diff] [blame] | 3900 | /** |
| 3901 | * Logs when a Vehicle Maps Service client's connection state has changed |
| 3902 | * |
| 3903 | * Logged from: |
| 3904 | * packages/services/Car/service/src/com/android/car/stats/VmsClientLog.java |
| 3905 | */ |
| 3906 | message VmsClientConnectionStateChanged { |
| 3907 | // The UID of the VMS client app |
| 3908 | optional int32 uid = 1 [(is_uid) = true]; |
| 3909 | |
| 3910 | enum State { |
| 3911 | UNKNOWN = 0; |
| 3912 | // Attempting to connect to the client |
| 3913 | CONNECTING = 1; |
| 3914 | // Client connection established |
| 3915 | CONNECTED = 2; |
| 3916 | // Client connection closed unexpectedly |
| 3917 | DISCONNECTED = 3; |
| 3918 | // Client connection closed by VMS |
| 3919 | TERMINATED = 4; |
| 3920 | // Error establishing the client connection |
| 3921 | CONNECTION_ERROR = 5; |
| 3922 | } |
| 3923 | |
| 3924 | optional State state = 2; |
| 3925 | } |
| 3926 | |
Jeff Sharkey | 6bd2157 | 2019-11-15 20:45:33 -0700 | [diff] [blame] | 3927 | /** |
| 3928 | * Logs when MediaProvider has successfully finished scanning a storage volume. |
| 3929 | * |
| 3930 | * Logged from: |
| 3931 | * packages/providers/MediaProvider/src/com/android/providers/media/scan/ModernMediaScanner.java |
| 3932 | */ |
| 3933 | message MediaProviderScanEvent { |
| 3934 | enum Reason { |
| 3935 | // Scan triggered due to unknown reason |
| 3936 | UNKNOWN = 0; |
| 3937 | // Scan triggered due to storage volume being mounted |
| 3938 | MOUNTED = 1; |
| 3939 | // Scan triggered due to explicit user action or app request |
| 3940 | DEMAND = 2; |
| 3941 | // Scan triggered due to idle maintenance |
| 3942 | IDLE = 3; |
| 3943 | } |
| 3944 | |
| 3945 | // Volume type that this event pertains to |
| 3946 | optional android.stats.mediaprovider.VolumeType volume_type = 1; |
| 3947 | // Reason why this scan was triggered |
| 3948 | optional Reason reason = 2; |
| 3949 | // Total number of files scanned |
| 3950 | optional int64 item_count = 3; |
| 3951 | // Duration of scan, normalized per file |
| 3952 | optional float normalized_duration_millis = 4; |
| 3953 | // Number of database inserts, normalized per file |
| 3954 | optional float normalized_insert_count = 5; |
| 3955 | // Number of database updates, normalized per file |
| 3956 | optional float normalized_update_count = 6; |
| 3957 | // Number of database deletes, normalized per file |
| 3958 | optional float normalized_delete_count = 7; |
| 3959 | } |
| 3960 | |
| 3961 | /** |
| 3962 | * Logs when an app has asked MediaProvider to delete media belonging to the user. |
| 3963 | * |
| 3964 | * Logged from: |
| 3965 | * packages/providers/MediaProvider/src/com/android/providers/media/MediaProvider.java |
| 3966 | */ |
| 3967 | message MediaProviderDeletionEvent { |
| 3968 | // Volume type that this event pertains to |
| 3969 | optional android.stats.mediaprovider.VolumeType volume_type = 1; |
| 3970 | // Device timestamp when this deletion event occurred |
| 3971 | optional int64 timestamp_millis = 2; |
| 3972 | // App that requested deletion |
| 3973 | optional string package_name = 3; |
| 3974 | // Number of items that were deleted |
| 3975 | optional int32 item_count = 4; |
| 3976 | } |
| 3977 | |
| 3978 | /** |
| 3979 | * Logs when an app has asked MediaProvider to grant them access to media belonging to the user. |
| 3980 | * |
| 3981 | * Logged from: |
| 3982 | * packages/providers/MediaProvider/src/com/android/providers/media/PermissionActivity.java |
| 3983 | */ |
| 3984 | message MediaProviderPermissionEvent { |
| 3985 | enum Result { |
| 3986 | UNKNOWN = 0; |
| 3987 | USER_GRANTED = 1; |
| 3988 | AUTO_GRANTED = 2; |
| 3989 | USER_DENIED = 3; |
| 3990 | USER_DENIED_WITH_PREJUDICE = 4; |
| 3991 | AUTO_DENIED = 5; |
| 3992 | } |
| 3993 | |
| 3994 | // Volume type that this event pertains to |
| 3995 | optional android.stats.mediaprovider.VolumeType volume_type = 1; |
| 3996 | // Device timestamp when this permission event occurred |
| 3997 | optional int64 timestamp_millis = 2; |
| 3998 | // App that requested permission |
| 3999 | optional string package_name = 3; |
| 4000 | // Number of items that were requested |
| 4001 | optional int32 item_count = 4; |
| 4002 | // Result of this request |
| 4003 | optional Result result = 5; |
| 4004 | } |
| 4005 | |
| 4006 | /** |
| 4007 | * Logs when MediaProvider has finished upgrading or downgrading its database schema. |
| 4008 | * |
| 4009 | * Logged from: |
| 4010 | * packages/providers/MediaProvider/src/com/android/providers/media/DatabaseHelper.java |
| 4011 | */ |
| 4012 | message MediaProviderSchemaChange { |
| 4013 | // Volume type that this event pertains to |
| 4014 | optional android.stats.mediaprovider.VolumeType volume_type = 1; |
| 4015 | // Old database version code |
| 4016 | optional int32 version_from = 2; |
| 4017 | // New database version code |
| 4018 | optional int32 version_to = 3; |
| 4019 | // Total number of files in database |
| 4020 | optional int64 item_count = 4; |
| 4021 | // Duration of schema change, normalized per file |
| 4022 | optional float normalized_duration_millis = 5; |
| 4023 | } |
| 4024 | |
| 4025 | /** |
| 4026 | * Logs when MediaProvider has finished an idle maintenance job. |
| 4027 | * |
| 4028 | * Logged from: |
| 4029 | * packages/providers/MediaProvider/src/com/android/providers/media/MediaProvider.java |
| 4030 | */ |
| 4031 | message MediaProviderIdleMaintenance { |
| 4032 | // Volume type that this event pertains to |
| 4033 | optional android.stats.mediaprovider.VolumeType volume_type = 1; |
| 4034 | |
| 4035 | // Total number of files in database |
| 4036 | optional int64 item_count = 2; |
| 4037 | // Duration of idle maintenance, normalized per file |
| 4038 | optional float normalized_duration_millis = 3; |
| 4039 | // Number of thumbnails found to be stale, normalized per file |
| 4040 | optional float normalized_stale_thumbnails = 4; |
| 4041 | // Number of items found to be expired, normalized per file |
| 4042 | optional float normalized_expired_media = 5; |
| 4043 | } |
| 4044 | |
Keun young Park | 3e033cb | 2019-12-18 11:27:35 -0800 | [diff] [blame] | 4045 | /** |
| 4046 | * Represents boot time event with duration in ms. |
| 4047 | * |
| 4048 | * Logged from: bootstat and various system server components. Check each enums for details. |
| 4049 | */ |
| 4050 | message BootTimeEventDuration { |
| 4051 | enum DurationEvent { |
| 4052 | UNKNOWN = 0; |
| 4053 | // Bootloader time excluding BOOTLOADER_UI_WAIT + boot complete time. Logged from bootstat. |
| 4054 | ABSOLUTE_BOOT_TIME = 1; |
| 4055 | // Bootloader's 1st stage execution time. |
| 4056 | // Logged from bootstat. |
| 4057 | BOOTLOADER_FIRST_STAGE_EXEC = 2; |
| 4058 | // Bootloader's 1st stage loading time. |
| 4059 | // Logged from bootstat. |
| 4060 | BOOTLOADER_FIRST_STAGE_LOAD = 3; |
| 4061 | // Bootloader's kernel loading time. |
| 4062 | // Logged from bootstat. |
| 4063 | BOOTLOADER_KERNEL_LOAD = 4; |
| 4064 | // Bootloader's 2nd stage execution time. |
| 4065 | // Logged from bootstat. |
| 4066 | BOOTLOADER_SECOND_STAGE_EXEC = 5; |
| 4067 | // Bootloader's 2nd stage loading time. |
| 4068 | // Logged from bootstat. |
| 4069 | BOOTLOADER_SECOND_STAGE_LOAD = 6; |
| 4070 | // Duration for Bootloader to show unlocked device's warning UI. This should not happen |
| 4071 | // for locked device. |
| 4072 | // Logged from bootstat. |
| 4073 | BOOTLOADER_UI_WAIT = 7; |
| 4074 | // Total time spend in bootloader. This is the sum of all BOOTLOADER_* listed above. |
| 4075 | // Logged from bootstat. |
| 4076 | BOOTLOADER_TOTAL = 8; |
| 4077 | // Shutdown duration inside init for the reboot before the current boot up. |
| 4078 | // Logged from f/b/services/.../BootReceiver.java. |
| 4079 | SHUTDOWN_DURATION = 9; |
| 4080 | // Total time for mounting of disk devices during bootup. |
| 4081 | // Logged from f/b/services/.../BootReceiver.java. |
| 4082 | MOUNT_DEFAULT_DURATION = 10; |
| 4083 | // Total time for early stage mounting of disk devices during bootup. |
| 4084 | // Logged from f/b/services/.../BootReceiver.java. |
| 4085 | MOUNT_EARLY_DURATION = 11; |
| 4086 | // Total time for late stage mounting of disk devices during bootup. |
| 4087 | // Logged from f/b/services/.../BootReceiver.java. |
| 4088 | MOUNT_LATE_DURATION = 12; |
| 4089 | // Average time to scan non-system app after OTA |
| 4090 | // Logged from f/b/services/.../PackageManagerService.java |
| 4091 | OTA_PACKAGE_MANAGER_INIT_TIME = 13; |
| 4092 | // Time to initialize Package manager after OTA |
| 4093 | // Logged from f/b/services/.../PackageManagerService.java |
| 4094 | OTA_PACKAGE_MANAGER_DATA_APP_AVG_SCAN_TIME = 14; |
| 4095 | // Time to scan all system app from Package manager after OTA |
| 4096 | // Logged from f/b/services/.../PackageManagerService.java |
| 4097 | OTA_PACKAGE_MANAGER_SYSTEM_APP_AVG_SCAN_TIME = 15; |
| 4098 | // Init's total time for cold boot stage. |
| 4099 | // Logged from bootstat. |
| 4100 | COLDBOOT_WAIT = 16; |
| 4101 | // Init's total time for initializing selinux. |
| 4102 | // Logged from bootstat. |
| 4103 | SELINUX_INIT = 17; |
| 4104 | // Time since last factory reset. |
| 4105 | // Logged from bootstat. |
| 4106 | FACTORY_RESET_TIME_SINCE_RESET = 18; |
| 4107 | } |
| 4108 | |
| 4109 | // Type of the event. |
| 4110 | optional DurationEvent event = 1; |
| 4111 | // Duration of the event in ms. |
| 4112 | optional int64 duration_millis = 2; |
| 4113 | } |
| 4114 | |
| 4115 | /** |
| 4116 | * Represents the start of specific boot time event during bootup in ms. This is usually a time |
| 4117 | * since boot-up. |
| 4118 | * |
| 4119 | * Logged from: bootstat and various system server components. Check each enums for details. |
| 4120 | */ |
| 4121 | message BootTimeEventElapsedTime { |
| 4122 | enum ElapsedTimeEvent { |
| 4123 | UNKNOWN = 0; |
| 4124 | // Time when init starts 1st stage. Logged from bootstat. |
| 4125 | ANDROID_INIT_STAGE_1 = 1; |
| 4126 | // Time when sys.boot_completed prop is set. |
| 4127 | // Logged from bootstat. |
| 4128 | BOOT_COMPLETE = 2; |
| 4129 | // BOOT_COMPLETE for encrypted device. |
| 4130 | BOOT_COMPLETE_ENCRYPTION = 3; |
| 4131 | // BOOT_COMPLETE for device with no encryption. |
| 4132 | BOOT_COMPLETE_NO_ENCRYPTION = 4; |
| 4133 | // Adjusted BOOT_COMPLETE for encrypted device extracting decryption time. |
| 4134 | BOOT_COMPLETE_POST_DESCRYPT = 5; |
| 4135 | // BOOT_COMPLETE after factory reset. |
| 4136 | FACTORY_RESET_BOOT_COMPLETE = 6; |
| 4137 | // BOOT_COMPLETE_NO_ENCRYPTION after factory reset. |
| 4138 | FACTORY_RESET_BOOT_COMPLETE_NO_ENCRYPTION = 7; |
| 4139 | // BOOT_COMPLETE_POST_DESCRYPT after factory reset. |
| 4140 | FACTORY_RESET_BOOT_COMPLETE_POST_DESCRYPT = 8; |
| 4141 | // BOOT_COMPLETE after OTA. |
| 4142 | OTA_BOOT_COMPLETE = 9; |
| 4143 | // BOOT_COMPLETE_NO_ENCRYPTION after OTA. |
| 4144 | OTA_BOOT_COMPLETE_NO_ENCRYPTION = 10; |
| 4145 | // BOOT_COMPLETE_POST_DESCRYPT after OTA. |
| 4146 | OTA_BOOT_COMPLETE_POST_DESCRYPT = 11; |
| 4147 | // Time when the system starts sending LOCKED_BOOT_COMPLETED broadcast. |
| 4148 | // Logged from f/b/services/.../UserController.java |
| 4149 | FRAMEWORK_LOCKED_BOOT_COMPLETED = 12; |
| 4150 | // Time when the system starts sending BOOT_COMPLETED broadcast. |
| 4151 | // Logged from f/b/services/.../UserController.java |
| 4152 | FRAMEWORK_BOOT_COMPLETED = 13; |
| 4153 | // Time when the package manager starts init. |
| 4154 | // Logged from f/b/services/.../SystemServer.java |
| 4155 | PACKAGE_MANAGER_INIT_START = 14; |
| 4156 | // Time when package manager is ready |
| 4157 | // Logged from f/b/services/.../SystemServer.java |
| 4158 | PACKAGE_MANAGER_INIT_READY = 15; |
| 4159 | // Represents the time when user has entered unlock credential for system with user pin. |
| 4160 | // Logged from bootstat. |
| 4161 | POST_DECRYPT = 16; |
| 4162 | // Represents the start of zygote's init. |
| 4163 | // Logged from zygote itself. |
| 4164 | ZYGOTE_INIT_START = 17; |
| 4165 | // Represents the start of secondary zygote's init. |
| 4166 | // TODO: add logging to zygote |
| 4167 | SECONDARY_ZYGOTE_INIT_START = 18; |
| 4168 | // Represents the start of system server's init. |
| 4169 | // Logged from f/b/services/.../SystemServer.java |
| 4170 | SYSTEM_SERVER_INIT_START = 19; |
| 4171 | // Represents the completion of system server's init. |
| 4172 | // Logged from f/b/services/.../SystemServer.java |
| 4173 | SYSTEM_SERVER_READY = 20; |
| 4174 | // Represents the start of launcher during boot-up. |
| 4175 | // TODO: add logging |
| 4176 | LAUNCHER_START = 21; |
| 4177 | // Represents the completion of launcher's initial rendering. User can use other apps from |
| 4178 | // launcher from this point. |
| 4179 | // TODO: add logging |
| 4180 | LAUNCHER_SHOWN = 22; |
| 4181 | } |
| 4182 | |
| 4183 | // Type of the event. |
| 4184 | optional ElapsedTimeEvent event = 1; |
| 4185 | // Time since bootup for the event. |
| 4186 | // It should be acquired from SystemClock elapsedRealtime() call or equivalent. |
| 4187 | optional int64 time_millis = 2; |
| 4188 | } |
| 4189 | |
| 4190 | /** |
| 4191 | * Boot time events with UTC time. |
| 4192 | * |
| 4193 | * Logged from: bootstat and various system server components. Check each enums for details. |
| 4194 | */ |
| 4195 | message BootTimeEventUtcTime { |
| 4196 | enum UtcTimeEvent { |
| 4197 | UNKNOWN = 0; |
| 4198 | // Time of the bootstat's marking of 1st boot after the last factory reset. |
| 4199 | // Logged from bootstat. |
| 4200 | FACTORY_RESET_RESET_TIME = 1; |
| 4201 | // The time when bootstat records FACTORY_RESET_* events. This is close to |
| 4202 | // BOOT_COMPLETE time for the current bootup. |
| 4203 | // Logged from bootstat. |
| 4204 | FACTORY_RESET_CURRENT_TIME = 2; |
| 4205 | // DUplicate of FACTORY_RESET_RESET_TIME added for debugging purpose. |
| 4206 | // Logged from bootstat. |
| 4207 | FACTORY_RESET_RECORD_VALUE = 3; |
| 4208 | } |
| 4209 | |
| 4210 | // Type of the event. |
| 4211 | optional UtcTimeEvent event = 1; |
| 4212 | // UTC time for the event. |
| 4213 | optional int64 utc_time_secs = 2; |
| 4214 | } |
| 4215 | |
| 4216 | /** |
| 4217 | * Boot time events representing specific error code during bootup. |
| 4218 | * Meaning of error code can be different per each event type. |
| 4219 | * |
| 4220 | * Logged from: bootstat and various system server components. Check each enums for details. |
| 4221 | */ |
| 4222 | message BootTimeEventErrorCode { |
| 4223 | enum ErrorCodeEvent { |
| 4224 | UNKNOWN = 0; |
| 4225 | // Linux error code for time() call to get the current UTC time. |
| 4226 | // Logged from bootstat. |
| 4227 | FACTORY_RESET_CURRENT_TIME_FAILURE = 1; |
| 4228 | // Represents UmountStat before the reboot for the current boot up. Error codes defined |
| 4229 | // as UMOUNT_STAT_* from init/reboot.cpp. |
| 4230 | // Logged from f/b/services/.../BootReceiver.java. |
| 4231 | SHUTDOWN_UMOUNT_STAT = 2; |
Keun young Park | df1534d | 2020-01-13 18:55:31 -0800 | [diff] [blame] | 4232 | // Reprepsents fie system mounting error code of /data partition for the current boot. |
| 4233 | // 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] | 4234 | // Logged from f/b/services/.../BootReceiver.java. |
Keun young Park | df1534d | 2020-01-13 18:55:31 -0800 | [diff] [blame] | 4235 | FS_MGR_FS_STAT_DATA_PARTITION = 3; |
Keun young Park | 3e033cb | 2019-12-18 11:27:35 -0800 | [diff] [blame] | 4236 | } |
| 4237 | |
| 4238 | // Type of the event. |
| 4239 | optional ErrorCodeEvent event = 1; |
| 4240 | // error code defined per each event type. |
| 4241 | // For example, this can have a value of FsStatFlags.FS_STAT_FULL_MOUNT_FAILED for the event of |
| 4242 | // FS_MGR_FS_STAT. |
| 4243 | optional int32 error_code = 2; |
| 4244 | } |
| 4245 | |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 4246 | ////////////////////////////////////////////////////////////////////// |
| 4247 | // Pulled atoms below this line // |
| 4248 | ////////////////////////////////////////////////////////////////////// |
| 4249 | |
| 4250 | /** |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 4251 | * Pulls bytes transferred via wifi (Sum of foreground and background usage). |
| 4252 | * |
| 4253 | * Pulled from: |
| 4254 | * StatsCompanionService (using BatteryStats to get which interfaces are wifi) |
| 4255 | */ |
Chenjie Yu | 31d14d7 | 2017-12-12 17:54:33 -0800 | [diff] [blame] | 4256 | message WifiBytesTransfer { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 4257 | optional int32 uid = 1 [(is_uid) = true]; |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 4258 | |
| 4259 | optional int64 rx_bytes = 2; |
| 4260 | |
| 4261 | optional int64 rx_packets = 3; |
| 4262 | |
| 4263 | optional int64 tx_bytes = 4; |
| 4264 | |
| 4265 | optional int64 tx_packets = 5; |
| 4266 | } |
| 4267 | |
| 4268 | /** |
| 4269 | * Pulls bytes transferred via wifi (separated by foreground and background usage). |
| 4270 | * |
| 4271 | * Pulled from: |
| 4272 | * StatsCompanionService (using BatteryStats to get which interfaces are wifi) |
| 4273 | */ |
Chenjie Yu | 31d14d7 | 2017-12-12 17:54:33 -0800 | [diff] [blame] | 4274 | message WifiBytesTransferByFgBg { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 4275 | optional int32 uid = 1 [(is_uid) = true]; |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 4276 | |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 4277 | // 1 denotes foreground and 0 denotes background. This is called Set in NetworkStats. |
| 4278 | optional bool is_foreground = 2; |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 4279 | |
| 4280 | optional int64 rx_bytes = 3; |
| 4281 | |
| 4282 | optional int64 rx_packets = 4; |
| 4283 | |
| 4284 | optional int64 tx_bytes = 5; |
| 4285 | |
| 4286 | optional int64 tx_packets = 6; |
| 4287 | } |
| 4288 | |
| 4289 | /** |
| 4290 | * Pulls bytes transferred via mobile networks (Sum of foreground and background usage). |
| 4291 | * |
| 4292 | * Pulled from: |
| 4293 | * StatsCompanionService (using BatteryStats to get which interfaces are mobile data) |
| 4294 | */ |
Chenjie Yu | 31d14d7 | 2017-12-12 17:54:33 -0800 | [diff] [blame] | 4295 | message MobileBytesTransfer { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 4296 | optional int32 uid = 1 [(is_uid) = true]; |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 4297 | |
| 4298 | optional int64 rx_bytes = 2; |
| 4299 | |
| 4300 | optional int64 rx_packets = 3; |
| 4301 | |
| 4302 | optional int64 tx_bytes = 4; |
| 4303 | |
| 4304 | optional int64 tx_packets = 5; |
| 4305 | } |
| 4306 | |
| 4307 | /** |
| 4308 | * Pulls bytes transferred via mobile networks (separated by foreground and background usage). |
| 4309 | * |
| 4310 | * Pulled from: |
| 4311 | * StatsCompanionService (using BatteryStats to get which interfaces are mobile data) |
| 4312 | */ |
Chenjie Yu | 31d14d7 | 2017-12-12 17:54:33 -0800 | [diff] [blame] | 4313 | message MobileBytesTransferByFgBg { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 4314 | optional int32 uid = 1 [(is_uid) = true]; |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 4315 | |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 4316 | // 1 denotes foreground and 0 denotes background. This is called Set in |
| 4317 | // NetworkStats. |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 4318 | optional bool is_foreground = 2; |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 4319 | |
| 4320 | optional int64 rx_bytes = 3; |
| 4321 | |
| 4322 | optional int64 rx_packets = 4; |
| 4323 | |
| 4324 | optional int64 tx_bytes = 5; |
| 4325 | |
| 4326 | optional int64 tx_packets = 6; |
| 4327 | } |
| 4328 | |
| 4329 | /** |
Chenjie Yu | 9d7720b | 2018-01-24 10:34:48 -0800 | [diff] [blame] | 4330 | * Pulls bytes transferred via bluetooth. It is pulled from Bluetooth controller. |
| 4331 | * |
| 4332 | * Pulled from: |
| 4333 | * StatsCompanionService |
| 4334 | */ |
| 4335 | message BluetoothBytesTransfer { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 4336 | optional int32 uid = 1 [(is_uid) = true]; |
Chenjie Yu | 9d7720b | 2018-01-24 10:34:48 -0800 | [diff] [blame] | 4337 | |
| 4338 | optional int64 rx_bytes = 2; |
| 4339 | |
| 4340 | optional int64 tx_bytes = 3; |
| 4341 | } |
| 4342 | |
| 4343 | /** |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 4344 | * Pulls the kernel wakelock durations. This atom is adapted from |
| 4345 | * android/internal/os/KernelWakelockStats.java |
| 4346 | * |
| 4347 | * Pulled from: |
| 4348 | * StatsCompanionService using KernelWakelockReader. |
| 4349 | */ |
Chenjie Yu | 31d14d7 | 2017-12-12 17:54:33 -0800 | [diff] [blame] | 4350 | message KernelWakelock { |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 4351 | optional string name = 1; |
| 4352 | |
| 4353 | optional int32 count = 2; |
| 4354 | |
| 4355 | optional int32 version = 3; |
| 4356 | |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 4357 | optional int64 time_micros = 4; |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 4358 | } |
Chenjie Yu | 5305e1d | 2017-10-31 13:49:36 -0700 | [diff] [blame] | 4359 | |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 4360 | /** |
Benjamin Schwartz | 51329b7 | 2018-12-06 10:48:03 -0800 | [diff] [blame] | 4361 | * Pulls low power state information. If power.stats HAL is not available, this |
| 4362 | * includes platform and subsystem sleep state information, |
| 4363 | * PowerStatePlatformSleepState, PowerStateVoter or PowerStateSubsystemSleepState |
| 4364 | * as defined in: |
Chenjie Yu | 5305e1d | 2017-10-31 13:49:36 -0700 | [diff] [blame] | 4365 | * hardware/interfaces/power/1.0/types.hal |
Chenjie Yu | 5305e1d | 2017-10-31 13:49:36 -0700 | [diff] [blame] | 4366 | * hardware/interfaces/power/1.1/types.hal |
Benjamin Schwartz | 51329b7 | 2018-12-06 10:48:03 -0800 | [diff] [blame] | 4367 | * If power.stats HAL is available, this includes PowerEntityStateResidencyResult |
| 4368 | * as defined in: |
| 4369 | * hardware/interfaces/power/stats/1.0/types.hal |
Chenjie Yu | 5305e1d | 2017-10-31 13:49:36 -0700 | [diff] [blame] | 4370 | */ |
Chenjie Yu | 31d14d7 | 2017-12-12 17:54:33 -0800 | [diff] [blame] | 4371 | message SubsystemSleepState { |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 4372 | // Subsystem name |
| 4373 | optional string subsystem_name = 1; |
| 4374 | // For PlatformLowPowerStats (hal 1.0), this is the voter name, which could be empty. |
| 4375 | // For SubsystemLowPowerStats (hal 1.1), this is the sleep state name. |
Benjamin Schwartz | 51329b7 | 2018-12-06 10:48:03 -0800 | [diff] [blame] | 4376 | // For PowerEntityStateResidencyResult (hal power/stats/1.0) this is the |
| 4377 | // powerEntityStateName from the corresponding PowerEntityStateInfo. |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 4378 | optional string subname = 2; |
Chenjie Yu | c8b7f22 | 2018-01-11 23:25:57 -0800 | [diff] [blame] | 4379 | // 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] | 4380 | optional uint64 count = 3; |
Chenjie Yu | c8b7f22 | 2018-01-11 23:25:57 -0800 | [diff] [blame] | 4381 | // 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] | 4382 | optional uint64 time_millis = 4; |
David Chen | 2158296 | 2017-11-01 17:32:46 -0700 | [diff] [blame] | 4383 | } |
Chenjie Yu | 7f8def9 | 2017-11-03 09:33:15 -0700 | [diff] [blame] | 4384 | |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 4385 | /** |
Bookatz | 92da283 | 2018-11-01 18:10:03 -0700 | [diff] [blame] | 4386 | * Pulls on-device power measurement information. |
| 4387 | * Data defined by hardware/interfaces/power/stats/1.0/types.hal. |
| 4388 | * Pulled from: |
| 4389 | * frameworks/base/cmds/statsd/src/external/PowerStatsPuller.cpp |
| 4390 | */ |
| 4391 | message OnDevicePowerMeasurement { |
| 4392 | // Name of the subsystem (to which the rail belongs). |
| 4393 | optional string subsystem_name = 1; |
| 4394 | |
| 4395 | // Rail name. The rail lies within the subsystem. |
| 4396 | optional string rail_name = 2; |
| 4397 | |
| 4398 | // Time (in ms since boot) at which the rail energy value was measured. |
| 4399 | // This may differ slightly from the time that statsd logs this information. |
| 4400 | optional uint64 measurement_timestamp_millis = 3; |
| 4401 | |
| 4402 | // Accumulated energy used via the rail since device boot in uWs. |
| 4403 | optional uint64 energy_microwatt_secs = 4; |
| 4404 | } |
| 4405 | |
| 4406 | /** |
Chenjie Yu | 7f8def9 | 2017-11-03 09:33:15 -0700 | [diff] [blame] | 4407 | * Pulls Cpu time per frequency. |
Chenjie Yu | 1ee9b74 | 2018-01-10 16:02:57 -0800 | [diff] [blame] | 4408 | * Pulls the time the cpu spend on the frequency index. Frequency index |
| 4409 | * starts from highest to lowest. The value should be monotonically |
| 4410 | * increasing since boot. However, if there is a cpu |
| 4411 | * hotplug event, the value would be reset as well. |
Chenjie Yu | 7f8def9 | 2017-11-03 09:33:15 -0700 | [diff] [blame] | 4412 | */ |
Chenjie Yu | 31d14d7 | 2017-12-12 17:54:33 -0800 | [diff] [blame] | 4413 | message CpuTimePerFreq { |
Chenjie Yu | 7f8def9 | 2017-11-03 09:33:15 -0700 | [diff] [blame] | 4414 | optional uint32 cluster = 1; |
| 4415 | optional uint32 freq_index = 2; |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 4416 | optional uint64 time_millis = 3; |
Chenjie Yu | 7f8def9 | 2017-11-03 09:33:15 -0700 | [diff] [blame] | 4417 | } |
Chenjie Yu | e33bc3b | 2017-11-06 17:56:44 -0800 | [diff] [blame] | 4418 | |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 4419 | /** |
Chenjie Yu | e33bc3b | 2017-11-06 17:56:44 -0800 | [diff] [blame] | 4420 | * Pulls Cpu Time Per Uid. |
| 4421 | * Note that isolated process uid time should be attributed to host uids. |
| 4422 | */ |
Chenjie Yu | 31d14d7 | 2017-12-12 17:54:33 -0800 | [diff] [blame] | 4423 | message CpuTimePerUid { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 4424 | optional int32 uid = 1 [(is_uid) = true]; |
Misha Wagner | 6bc6c91 | 2018-11-16 13:19:54 +0000 | [diff] [blame] | 4425 | optional uint64 user_time_micros = 2; |
| 4426 | optional uint64 sys_time_micros = 3; |
Chenjie Yu | e33bc3b | 2017-11-06 17:56:44 -0800 | [diff] [blame] | 4427 | } |
| 4428 | |
| 4429 | /** |
| 4430 | * Pulls Cpu Time Per Uid per frequency. |
| 4431 | * Note that isolated process uid time should be attributed to host uids. |
| 4432 | * For each uid, we order the time by descending frequencies. |
| 4433 | */ |
Chenjie Yu | 31d14d7 | 2017-12-12 17:54:33 -0800 | [diff] [blame] | 4434 | message CpuTimePerUidFreq { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 4435 | optional int32 uid = 1 [(is_uid) = true]; |
Chenjie Yu | ec67661 | 2018-03-07 09:19:17 -0800 | [diff] [blame] | 4436 | optional uint32 freq_index = 2; |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 4437 | optional uint64 time_millis = 3; |
Chenjie Yu | e33bc3b | 2017-11-06 17:56:44 -0800 | [diff] [blame] | 4438 | } |
Hugo Benichi | 884970e | 2017-11-14 22:42:46 +0900 | [diff] [blame] | 4439 | |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 4440 | /** |
| 4441 | * Pulls Wifi Controller Activity Energy Info |
| 4442 | */ |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 4443 | message WifiActivityInfo { |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 4444 | // timestamp(wall clock) of record creation |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 4445 | optional uint64 timestamp_millis = 1; |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 4446 | // stack reported state |
| 4447 | // TODO: replace this with proto enum |
| 4448 | optional int32 stack_state = 2; |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 4449 | // tx time in millis |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 4450 | optional uint64 controller_tx_time_millis = 3; |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 4451 | // rx time in millis |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 4452 | optional uint64 controller_rx_time_millis = 4; |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 4453 | // idle time in millis |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 4454 | optional uint64 controller_idle_time_millis = 5; |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 4455 | // product of current(mA), voltage(V) and time(ms) |
| 4456 | optional uint64 controller_energy_used = 6; |
| 4457 | } |
| 4458 | |
| 4459 | /** |
| 4460 | * Pulls Modem Activity Energy Info |
| 4461 | */ |
Chenjie Yu | 31d14d7 | 2017-12-12 17:54:33 -0800 | [diff] [blame] | 4462 | message ModemActivityInfo { |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 4463 | // timestamp(wall clock) of record creation |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 4464 | optional uint64 timestamp_millis = 1; |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 4465 | // sleep time in millis. |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 4466 | optional uint64 sleep_time_millis = 2; |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 4467 | // idle time in millis |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 4468 | optional uint64 controller_idle_time_millis = 3; |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 4469 | /** |
| 4470 | * Tx power index |
| 4471 | * index 0 = tx_power < 0dBm |
| 4472 | * index 1 = 0dBm < tx_power < 5dBm |
| 4473 | * index 2 = 5dBm < tx_power < 15dBm |
| 4474 | * index 3 = 15dBm < tx_power < 20dBm |
| 4475 | * index 4 = tx_power > 20dBm |
| 4476 | */ |
| 4477 | // tx time in ms at power level 0 |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 4478 | optional uint64 controller_tx_time_pl0_millis = 4; |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 4479 | // tx time in ms at power level 1 |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 4480 | optional uint64 controller_tx_time_pl1_millis = 5; |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 4481 | // tx time in ms at power level 2 |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 4482 | optional uint64 controller_tx_time_pl2_millis = 6; |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 4483 | // tx time in ms at power level 3 |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 4484 | optional uint64 controller_tx_time_pl3_millis = 7; |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 4485 | // tx time in ms at power level 4 |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 4486 | optional uint64 controller_tx_time_pl4_millis = 8; |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 4487 | // rx time in ms at power level 5 |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 4488 | optional uint64 controller_rx_time_millis = 9; |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 4489 | // product of current(mA), voltage(V) and time(ms) |
Chen Xu | 7322e4a | 2019-09-07 15:51:22 -0700 | [diff] [blame] | 4490 | optional uint64 energy_used = 10 [deprecated=true]; |
Joe Onorato | 62c220b | 2017-11-18 20:32:56 -0800 | [diff] [blame] | 4491 | } |
Rajeev Kumar | 508a9bf | 2018-01-18 15:49:11 -0800 | [diff] [blame] | 4492 | |
Chenjie Yu | 9d7720b | 2018-01-24 10:34:48 -0800 | [diff] [blame] | 4493 | /** |
| 4494 | * Pulls Bluetooth Activity Energy Info |
| 4495 | * Note: BluetoothBytesTransfer is pulled at the same time from the controller. |
| 4496 | */ |
| 4497 | message BluetoothActivityInfo { |
| 4498 | // timestamp(wall clock) of record creation |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 4499 | optional uint64 timestamp_millis = 1; |
Chenjie Yu | 9d7720b | 2018-01-24 10:34:48 -0800 | [diff] [blame] | 4500 | // bluetooth stack state |
| 4501 | optional int32 bluetooth_stack_state = 2; |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 4502 | // tx time in millis |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 4503 | optional uint64 controller_tx_time_millis = 3; |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 4504 | // rx time in millis |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 4505 | optional uint64 controller_rx_time_millis = 4; |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 4506 | // idle time in millis |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 4507 | optional uint64 controller_idle_time_millis = 5; |
Chenjie Yu | 9d7720b | 2018-01-24 10:34:48 -0800 | [diff] [blame] | 4508 | // product of current(mA), voltage(V) and time(ms) |
| 4509 | optional uint64 energy_used = 6; |
| 4510 | } |
| 4511 | |
Rajeev Kumar | 508a9bf | 2018-01-18 15:49:11 -0800 | [diff] [blame] | 4512 | /* |
Rajeev Kumar | 8a9fa05 | 2018-01-25 19:03:09 -0800 | [diff] [blame] | 4513 | * Logs the memory stats for a process. |
Rafal Slawik | da51b93 | 2018-12-13 16:31:33 +0000 | [diff] [blame] | 4514 | * |
| 4515 | * Pulled from StatsCompanionService for all managed processes (from ActivityManagerService). |
Rajeev Kumar | 8a9fa05 | 2018-01-25 19:03:09 -0800 | [diff] [blame] | 4516 | */ |
| 4517 | message ProcessMemoryState { |
| 4518 | // The uid if available. -1 means not available. |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 4519 | optional int32 uid = 1 [(is_uid) = true]; |
Rajeev Kumar | 8a9fa05 | 2018-01-25 19:03:09 -0800 | [diff] [blame] | 4520 | |
| 4521 | // The process name. |
Rafal Slawik | da51b93 | 2018-12-13 16:31:33 +0000 | [diff] [blame] | 4522 | // Usually package name, "system" for system server. |
| 4523 | // Provided by ActivityManagerService. |
Rajeev Kumar | 8a9fa05 | 2018-01-25 19:03:09 -0800 | [diff] [blame] | 4524 | optional string process_name = 2; |
| 4525 | |
Rafal Slawik | da51b93 | 2018-12-13 16:31:33 +0000 | [diff] [blame] | 4526 | // Current OOM score adjustment. Value read from ProcessRecord. |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 4527 | optional int32 oom_adj_score = 3; |
Rajeev Kumar | 8a9fa05 | 2018-01-25 19:03:09 -0800 | [diff] [blame] | 4528 | |
| 4529 | // # of page-faults |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 4530 | optional int64 page_fault = 4; |
Rajeev Kumar | 8a9fa05 | 2018-01-25 19:03:09 -0800 | [diff] [blame] | 4531 | |
| 4532 | // # of major page-faults |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 4533 | optional int64 page_major_fault = 5; |
Rajeev Kumar | 8a9fa05 | 2018-01-25 19:03:09 -0800 | [diff] [blame] | 4534 | |
Rajeev Kumar | 9023599 | 2018-01-29 11:06:48 -0800 | [diff] [blame] | 4535 | // RSS |
Rafal Slawik | 203c3db | 2019-09-25 19:53:01 +0100 | [diff] [blame] | 4536 | // Value is read from memory.stat, field total_rss if per-app memory |
| 4537 | // cgroups are enabled. Otherwise, value from /proc/pid/stat. |
Rajeev Kumar | 9023599 | 2018-01-29 11:06:48 -0800 | [diff] [blame] | 4538 | optional int64 rss_in_bytes = 6; |
| 4539 | |
| 4540 | // CACHE |
Rafal Slawik | da51b93 | 2018-12-13 16:31:33 +0000 | [diff] [blame] | 4541 | // Value is read from memory.stat, field total_cache if per-app memory |
| 4542 | // cgroups are enabled. Otherwise, 0. |
Rajeev Kumar | 9023599 | 2018-01-29 11:06:48 -0800 | [diff] [blame] | 4543 | optional int64 cache_in_bytes = 7; |
| 4544 | |
| 4545 | // SWAP |
Rafal Slawik | da51b93 | 2018-12-13 16:31:33 +0000 | [diff] [blame] | 4546 | // 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] | 4547 | // cgroups are enabled. Otherwise, 0. |
Rajeev Kumar | 9023599 | 2018-01-29 11:06:48 -0800 | [diff] [blame] | 4548 | optional int64 swap_in_bytes = 8; |
Rafal Slawik | aaf6089 | 2018-09-12 13:04:30 +0100 | [diff] [blame] | 4549 | |
Rafal Slawik | 203c3db | 2019-09-25 19:53:01 +0100 | [diff] [blame] | 4550 | // Deprecated: use ProcessMemoryHighWaterMark atom instead. Always -1. |
Rafal Slawik | 3bea895 | 2018-11-15 12:39:33 +0000 | [diff] [blame] | 4551 | optional int64 rss_high_watermark_in_bytes = 9 [deprecated = true]; |
Rafal Slawik | 272a816 | 2018-11-01 15:12:28 +0000 | [diff] [blame] | 4552 | |
Rafal Slawik | 203c3db | 2019-09-25 19:53:01 +0100 | [diff] [blame] | 4553 | // Deprecated: use ProcessMemorySnapshot atom instead. Always -1. |
| 4554 | optional int64 start_time_nanos = 10 [deprecated = true]; |
Ioannis Ilkos | 466ad6c | 2019-06-18 17:42:00 +0100 | [diff] [blame] | 4555 | |
Rafal Slawik | 203c3db | 2019-09-25 19:53:01 +0100 | [diff] [blame] | 4556 | // Deprecated: use ProcessMemorySnapshot atom instead. Always -1. |
| 4557 | optional int32 anon_rss_and_swap_in_kilobytes = 11 [deprecated = true]; |
Rafal Slawik | 0862158 | 2018-10-15 14:53:07 +0100 | [diff] [blame] | 4558 | } |
| 4559 | |
| 4560 | /* |
Rafal Slawik | 3bea895 | 2018-11-15 12:39:33 +0000 | [diff] [blame] | 4561 | * Logs the memory high-water mark for a process. |
Rafal Slawik | da51b93 | 2018-12-13 16:31:33 +0000 | [diff] [blame] | 4562 | * |
| 4563 | * Pulled from StatsCompanionService for all managed processes (from ActivityManagerServie) |
| 4564 | * and for selected native processes. |
Rafal Slawik | 44b8814 | 2018-12-15 16:48:09 +0000 | [diff] [blame] | 4565 | * |
| 4566 | * Pulling this atom resets high-water mark counters for all processes. |
Rafal Slawik | 3bea895 | 2018-11-15 12:39:33 +0000 | [diff] [blame] | 4567 | */ |
| 4568 | message ProcessMemoryHighWaterMark { |
| 4569 | // The uid if available. -1 means not available. |
| 4570 | optional int32 uid = 1 [(is_uid) = true]; |
| 4571 | |
Rafal Slawik | da51b93 | 2018-12-13 16:31:33 +0000 | [diff] [blame] | 4572 | // The process name. |
| 4573 | // Usually package name or process cmdline. |
| 4574 | // Provided by ActivityManagerService or read from /proc/PID/cmdline. |
Rafal Slawik | 3bea895 | 2018-11-15 12:39:33 +0000 | [diff] [blame] | 4575 | optional string process_name = 2; |
| 4576 | |
Rafal Slawik | 239b680 | 2019-09-09 18:46:01 +0100 | [diff] [blame] | 4577 | // Deprecated: use rss_high_water_mark_in_kilobytes instead. This field is |
| 4578 | // computed by converting kilobytes to bytes. |
| 4579 | optional int64 rss_high_water_mark_in_bytes = 3 [deprecated = true]; |
| 4580 | |
Rafal Slawik | 3bea895 | 2018-11-15 12:39:33 +0000 | [diff] [blame] | 4581 | // RSS high-water mark. Peak RSS usage of the process. Read from the VmHWM field in |
| 4582 | // /proc/PID/status. |
Rafal Slawik | 239b680 | 2019-09-09 18:46:01 +0100 | [diff] [blame] | 4583 | optional int32 rss_high_water_mark_in_kilobytes = 4; |
Rafal Slawik | 3bea895 | 2018-11-15 12:39:33 +0000 | [diff] [blame] | 4584 | } |
| 4585 | |
| 4586 | /* |
Rafal Slawik | 7efcefb | 2019-09-20 11:16:20 +0100 | [diff] [blame] | 4587 | * Logs the memory stats for a process. |
| 4588 | * |
| 4589 | * Pulled from StatsCompanionService for all managed processes (from ActivityManagerService) |
| 4590 | * and for selected native processes. |
| 4591 | */ |
| 4592 | message ProcessMemorySnapshot { |
| 4593 | // The uid if available. -1 means not available. |
| 4594 | optional int32 uid = 1 [(is_uid) = true]; |
| 4595 | |
| 4596 | // The process name. |
| 4597 | // Usually package name or process cmdline. |
| 4598 | // Provided by ActivityManagerService or read from /proc/PID/cmdline. |
| 4599 | optional string process_name = 2; |
| 4600 | |
| 4601 | // The pid of the process. |
| 4602 | // Allows to disambiguate instances of the process. |
| 4603 | optional int32 pid = 3; |
| 4604 | |
| 4605 | // The current OOM score adjustment value. |
| 4606 | // Read from ProcessRecord for managed processes. |
| 4607 | // Placeholder -1001 (OOM_SCORE_ADJ_MIN - 1, outside of allowed range) for native ones. |
| 4608 | optional int32 oom_score_adj = 4; |
| 4609 | |
| 4610 | // The current RSS of the process. |
| 4611 | // VmRSS from /proc/pid/status. |
| 4612 | optional int32 rss_in_kilobytes = 5; |
| 4613 | |
| 4614 | // The current anon RSS of the process. |
| 4615 | // RssAnon from /proc/pid/status. |
| 4616 | optional int32 anon_rss_in_kilobytes = 6; |
| 4617 | |
| 4618 | // The current swap size of the process. |
| 4619 | // VmSwap from /proc/pid/status. |
| 4620 | optional int32 swap_in_kilobytes = 7; |
| 4621 | |
| 4622 | // The sum of rss_in_kilobytes and swap_in_kilobytes. |
| 4623 | optional int32 anon_rss_and_swap_in_kilobytes = 8; |
| 4624 | } |
| 4625 | |
| 4626 | /* |
Chenjie Yu | 9d7720b | 2018-01-24 10:34:48 -0800 | [diff] [blame] | 4627 | * Elapsed real time from SystemClock. |
Chenjie Yu | 9da105b | 2018-01-13 12:41:08 -0800 | [diff] [blame] | 4628 | */ |
Chenjie Yu | 9d7720b | 2018-01-24 10:34:48 -0800 | [diff] [blame] | 4629 | message SystemElapsedRealtime { |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 4630 | optional uint64 time_millis = 1; |
Chenjie Yu | 9da105b | 2018-01-13 12:41:08 -0800 | [diff] [blame] | 4631 | } |
| 4632 | |
| 4633 | /* |
Chenjie Yu | 9d7720b | 2018-01-24 10:34:48 -0800 | [diff] [blame] | 4634 | * Up time from SystemClock. |
Chenjie Yu | 9da105b | 2018-01-13 12:41:08 -0800 | [diff] [blame] | 4635 | */ |
Chenjie Yu | 9d7720b | 2018-01-24 10:34:48 -0800 | [diff] [blame] | 4636 | message SystemUptime { |
| 4637 | // Milliseconds since the system was booted. |
| 4638 | // This clock stops when the system enters deep sleep (CPU off, display dark, device waiting |
| 4639 | // for external input). |
| 4640 | // 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] | 4641 | optional uint64 uptime_millis = 1; |
Chenjie Yu | 9da105b | 2018-01-13 12:41:08 -0800 | [diff] [blame] | 4642 | } |
| 4643 | |
| 4644 | /* |
| 4645 | * Reads from /proc/uid_concurrent_active_time which has the format: |
| 4646 | * active: X (X is # cores) |
| 4647 | * [uid0]: [time-0] [time-1] [time-2] ... (# entries = # cores) |
| 4648 | * [uid1]: [time-0] [time-1] [time-2] ... ... |
| 4649 | * ... |
| 4650 | * Time-N means the CPU time a UID spent running concurrently with N other processes. |
| 4651 | * The file contains a monotonically increasing count of time for a single boot. |
| 4652 | */ |
| 4653 | message CpuActiveTime { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 4654 | optional int32 uid = 1 [(is_uid) = true]; |
Chenjie Yu | ec67661 | 2018-03-07 09:19:17 -0800 | [diff] [blame] | 4655 | optional uint64 time_millis = 2; |
Chenjie Yu | 9da105b | 2018-01-13 12:41:08 -0800 | [diff] [blame] | 4656 | } |
| 4657 | |
| 4658 | /** |
| 4659 | * Reads from /proc/uid_concurrent_policy_time which has the format: |
| 4660 | * policy0: X policy4: Y (there are X cores on policy0, Y cores on policy4) |
| 4661 | * [uid0]: [time-0-0] [time-0-1] ... [time-1-0] [time-1-1] ... |
| 4662 | * [uid1]: [time-0-0] [time-0-1] ... [time-1-0] [time-1-1] ... |
| 4663 | * ... |
| 4664 | * Time-X-Y means the time a UID spent on clusterX running concurrently with Y other processes. |
| 4665 | * The file contains a monotonically increasing count of time for a single boot. |
| 4666 | */ |
| 4667 | message CpuClusterTime { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 4668 | optional int32 uid = 1 [(is_uid) = true]; |
Chenjie Yu | ec67661 | 2018-03-07 09:19:17 -0800 | [diff] [blame] | 4669 | optional int32 cluster_index = 2; |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 4670 | optional uint64 time_millis = 3; |
Chenjie Yu | 937d742 | 2018-01-10 16:37:53 -0800 | [diff] [blame] | 4671 | } |
| 4672 | |
| 4673 | /* |
| 4674 | * Pulls free disk space, for data, system partition and temporary directory. |
| 4675 | */ |
| 4676 | message DiskSpace { |
| 4677 | // available bytes in data partition |
| 4678 | optional uint64 data_available_bytes = 1; |
| 4679 | // available bytes in system partition |
| 4680 | optional uint64 system_available_bytes = 2; |
| 4681 | // available bytes in download cache or temp directories |
| 4682 | optional uint64 temp_available_bytes = 3; |
| 4683 | } |
Tej Singh | bf972d9 | 2018-01-10 20:51:13 -0800 | [diff] [blame] | 4684 | |
| 4685 | /** |
| 4686 | * Pulls battery coulomb counter, which is the remaining battery charge in uAh. |
Tej Singh | 9876a3b | 2019-01-11 14:28:35 -0800 | [diff] [blame] | 4687 | * |
| 4688 | * Pulled from StatsCompanionService.java |
Tej Singh | bf972d9 | 2018-01-10 20:51:13 -0800 | [diff] [blame] | 4689 | */ |
| 4690 | message RemainingBatteryCapacity { |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 4691 | optional int32 charge_micro_ampere_hour = 1; |
Tej Singh | bf972d9 | 2018-01-10 20:51:13 -0800 | [diff] [blame] | 4692 | } |
| 4693 | |
| 4694 | /** |
| 4695 | * Pulls battery capacity, which is the battery capacity when full in uAh. |
Tej Singh | 4029831 | 2018-02-16 00:15:09 -0800 | [diff] [blame] | 4696 | * Pulled from: |
| 4697 | * frameworks/base/cmds/statsd/src/external/ResourceHealthManagerPuller.cpp |
Tej Singh | bf972d9 | 2018-01-10 20:51:13 -0800 | [diff] [blame] | 4698 | */ |
| 4699 | message FullBatteryCapacity { |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 4700 | optional int32 capacity_micro_ampere_hour = 1; |
Tej Singh | 4029831 | 2018-02-16 00:15:09 -0800 | [diff] [blame] | 4701 | } |
| 4702 | |
| 4703 | /** |
Bookatz | 17f0d8a | 2018-09-13 12:56:32 -0700 | [diff] [blame] | 4704 | * Pulls battery voltage. |
| 4705 | * Pulled from: |
| 4706 | * frameworks/base/cmds/statsd/src/external/ResourceHealthManagerPuller.cpp |
| 4707 | */ |
| 4708 | message BatteryVoltage { |
| 4709 | // The voltage of the battery, in millivolts. |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 4710 | optional int32 voltage_millivolt = 1; |
Bookatz | 17f0d8a | 2018-09-13 12:56:32 -0700 | [diff] [blame] | 4711 | } |
| 4712 | |
| 4713 | /** |
Tej Singh | b1dbc8b | 2018-11-19 15:49:47 -0800 | [diff] [blame] | 4714 | * Pulls battery level (percent full, from 0 to 100). |
| 4715 | * |
| 4716 | * Pulled from: |
| 4717 | * frameworks/base/cmds/statsd/src/external/ResourceHealthManagerPuller.cpp |
| 4718 | */ |
| 4719 | message BatteryLevel { |
| 4720 | // Battery level. Should be in [0, 100]. |
| 4721 | optional int32 battery_level = 1; |
| 4722 | } |
| 4723 | |
| 4724 | /** |
Tej Singh | d89137e | 2018-03-26 14:51:40 -0700 | [diff] [blame] | 4725 | * Pulls the temperature of various parts of the device. |
| 4726 | * 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] | 4727 | * |
Maggie White | 442b631 | 2019-04-05 16:26:44 -0700 | [diff] [blame] | 4728 | * Pulled from StatsCompanionService.java |
Tej Singh | 4029831 | 2018-02-16 00:15:09 -0800 | [diff] [blame] | 4729 | */ |
| 4730 | message Temperature { |
Tej Singh | b6070b9 | 2018-12-19 19:00:12 -0800 | [diff] [blame] | 4731 | // The type of temperature being reported. Eg. CPU, GPU, SKIN, BATTERY, BCL_. |
Tej Singh | 4029831 | 2018-02-16 00:15:09 -0800 | [diff] [blame] | 4732 | optional android.os.TemperatureTypeEnum sensor_location = 1; |
| 4733 | |
| 4734 | // The name of the temperature source. Eg. CPU0 |
| 4735 | optional string sensor_name = 2; |
| 4736 | |
Tej Singh | d89137e | 2018-03-26 14:51:40 -0700 | [diff] [blame] | 4737 | // Temperature in tenths of a degree C. |
Tej Singh | b6070b9 | 2018-12-19 19:00:12 -0800 | [diff] [blame] | 4738 | // For BCL, it is decimillivolt, decimilliamps, and percentage * 10. |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 4739 | optional int32 temperature_deci_celsius = 3; |
Maggie White | 442b631 | 2019-04-05 16:26:44 -0700 | [diff] [blame] | 4740 | |
| 4741 | // Relative severity of the throttling, see enum definition. |
| 4742 | optional android.os.ThrottlingSeverityEnum severity = 4; |
yro | a1fe77c | 2018-02-26 14:22:54 -0800 | [diff] [blame] | 4743 | } |
Olivier Gaillard | 00bfb1b | 2018-07-10 11:25:09 +0100 | [diff] [blame] | 4744 | |
| 4745 | /** |
| 4746 | * Pulls the statistics of calls to Binder. |
| 4747 | * |
Olivier Gaillard | d25f7a8 | 2018-09-12 14:28:48 +0100 | [diff] [blame] | 4748 | * Binder stats will be reset every time the data is pulled. It means it can only be pulled by one |
| 4749 | * config on the device. |
Olivier Gaillard | 9ea238d | 2018-07-24 10:26:31 +0100 | [diff] [blame] | 4750 | * |
Olivier Gaillard | 720ec5b | 2018-10-30 17:32:56 +0000 | [diff] [blame] | 4751 | * Next tag: 15 |
Olivier Gaillard | 00bfb1b | 2018-07-10 11:25:09 +0100 | [diff] [blame] | 4752 | */ |
| 4753 | message BinderCalls { |
Olivier Gaillard | 720ec5b | 2018-10-30 17:32:56 +0000 | [diff] [blame] | 4754 | // UID of the process responsible for the binder transaction. It will be set if the process |
| 4755 | // executing the binder transaction attribute the transaction to another uid using |
| 4756 | // Binder.setThreadWorkSource(). |
| 4757 | // |
| 4758 | // If not set, the value will be -1. |
Olivier Gaillard | 9ea238d | 2018-07-24 10:26:31 +0100 | [diff] [blame] | 4759 | optional int32 uid = 1 [(is_uid) = true]; |
Olivier Gaillard | 720ec5b | 2018-10-30 17:32:56 +0000 | [diff] [blame] | 4760 | // UID of the process executing the binder transaction. |
| 4761 | optional int32 direct_caller_uid = 14; |
Olivier Gaillard | 9ea238d | 2018-07-24 10:26:31 +0100 | [diff] [blame] | 4762 | // Fully qualified class name of the API call. |
| 4763 | // |
| 4764 | // This is a system server class name. |
| 4765 | // |
| 4766 | // TODO(gaillard): figure out if binder call stats includes data from isolated uids, if a uid |
| 4767 | // gets recycled and we have isolated uids, we might attribute the data incorrectly. |
| 4768 | // TODO(gaillard): there is a high dimensions cardinality, figure out if we should drop the less |
| 4769 | // commonly used APIs. |
| 4770 | optional string service_class_name = 2; |
| 4771 | // Method name of the API call. It can also be a transaction code if we cannot |
| 4772 | // resolve it to a name. See Binder#getTransactionName. |
| 4773 | // |
| 4774 | // This is a system server method name. |
| 4775 | optional string service_method_name = 3; |
| 4776 | // Total number of API calls. |
| 4777 | optional int64 call_count = 4; |
| 4778 | // True if the screen was interactive PowerManager#isInteractive at the end of the call. |
| 4779 | optional bool screen_interactive = 13; |
| 4780 | // Total number of API calls we have data recorded for. If we collected data for all the calls, |
| 4781 | // call_count will be equal to recorded_call_count. |
| 4782 | // |
| 4783 | // If recorded_call_count is different than call_count, it means data collection has been |
| 4784 | // sampled. All the fields below will be sampled in this case. |
| 4785 | optional int64 recorded_call_count = 12; |
| 4786 | // Number of exceptions thrown by the API. |
| 4787 | optional int64 recorded_exception_count = 5; |
| 4788 | // Total latency of all API calls. |
| 4789 | // Average can be computed using total_latency_micros / recorded_call_count. |
| 4790 | optional int64 recorded_total_latency_micros = 6; |
| 4791 | // Maximum latency of one API call. |
| 4792 | optional int64 recorded_max_latency_micros = 7; |
| 4793 | // Total CPU usage of all API calls. |
| 4794 | // Average can be computed using total_cpu_micros / recorded_call_count. |
| 4795 | // Total can be computed using total_cpu_micros / recorded_call_count * call_count. |
| 4796 | optional int64 recorded_total_cpu_micros = 8; |
| 4797 | // Maximum CPU usage of one API call. |
| 4798 | optional int64 recorded_max_cpu_micros = 9; |
| 4799 | // Maximum parcel reply size of one API call. |
| 4800 | optional int64 recorded_max_reply_size_bytes = 10; |
| 4801 | // Maximum parcel request size of one API call. |
| 4802 | optional int64 recorded_max_request_size_bytes = 11; |
| 4803 | } |
| 4804 | |
| 4805 | /** |
| 4806 | * Pulls the statistics of exceptions during calls to Binder. |
| 4807 | * |
| 4808 | * Binder stats are cumulative from boot unless somebody reset the data using |
| 4809 | * > adb shell dumpsys binder_calls_stats --reset |
| 4810 | */ |
| 4811 | message BinderCallsExceptions { |
| 4812 | // Exception class name, e.g. java.lang.IllegalArgumentException. |
| 4813 | // |
| 4814 | // This is an exception class name thrown by the system server. |
| 4815 | optional string exception_class_name = 1; |
| 4816 | // Total number of exceptions. |
| 4817 | optional int64 exception_count = 2; |
Olivier Gaillard | 00bfb1b | 2018-07-10 11:25:09 +0100 | [diff] [blame] | 4818 | } |
Marcin Oczeretko | d8cc859 | 2018-08-22 16:07:36 +0100 | [diff] [blame] | 4819 | |
Marcin Oczeretko | 3e6494e | 2018-09-10 18:06:52 +0100 | [diff] [blame] | 4820 | /** |
| 4821 | * Pulls the statistics of message dispatching on HandlerThreads. |
| 4822 | * |
| 4823 | * Looper stats will be reset every time the data is pulled. It means it can only be pulled by one |
| 4824 | * config on the device. |
| 4825 | * |
| 4826 | * Next tag: 11 |
| 4827 | */ |
Marcin Oczeretko | d8cc859 | 2018-08-22 16:07:36 +0100 | [diff] [blame] | 4828 | message LooperStats { |
Marcin Oczeretko | ec75872 | 2018-09-12 12:53:47 +0100 | [diff] [blame] | 4829 | // 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] | 4830 | optional int32 uid = 1 [(is_uid) = true]; |
| 4831 | |
| 4832 | // Fully qualified class name of the handler target class. |
| 4833 | // |
| 4834 | // This field does not contain PII. This is a system server class name. |
| 4835 | optional string handler_class_name = 2; |
| 4836 | |
| 4837 | // The name of the thread that runs the Looper. |
| 4838 | // |
| 4839 | // This field does not contain PII. This is a system server thread name. |
| 4840 | optional string looper_thread_name = 3; |
| 4841 | |
| 4842 | // The name of the dispatched message. |
| 4843 | // |
| 4844 | // This field does not contain PII. This is a system server constant or class |
| 4845 | // name. |
| 4846 | optional string message_name = 4; |
| 4847 | |
| 4848 | // Total number of successfully dispatched messages. |
| 4849 | optional int64 message_count = 5; |
| 4850 | |
| 4851 | // Total number of messages that failed dispatching. |
| 4852 | optional int64 exception_count = 6; |
| 4853 | |
| 4854 | // Total number of processed messages we have data recorded for. If we |
| 4855 | // collected data for all the messages, message_count will be equal to |
| 4856 | // recorded_message_count. |
| 4857 | // |
| 4858 | // If recorded_message_count is different than message_count, it means data |
Marcin Oczeretko | c06331a | 2018-10-02 13:00:38 +0100 | [diff] [blame] | 4859 | // 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] | 4860 | optional int64 recorded_message_count = 7; |
| 4861 | |
| 4862 | // Total latency of all processed messages. |
| 4863 | // Average can be computed using recorded_total_latency_micros / |
| 4864 | // recorded_message_count. |
| 4865 | optional int64 recorded_total_latency_micros = 8; |
| 4866 | |
| 4867 | // Total CPU usage of all processed message. |
| 4868 | // Average can be computed using recorded_total_cpu_micros / |
| 4869 | // recorded_message_count. Total can be computed using |
Marcin Oczeretko | 3e6494e | 2018-09-10 18:06:52 +0100 | [diff] [blame] | 4870 | // recorded_total_cpu_micros / recorded_message_count * message_count. |
Marcin Oczeretko | d8cc859 | 2018-08-22 16:07:36 +0100 | [diff] [blame] | 4871 | optional int64 recorded_total_cpu_micros = 9; |
Marcin Oczeretko | 3e6494e | 2018-09-10 18:06:52 +0100 | [diff] [blame] | 4872 | |
| 4873 | // True if the screen was interactive PowerManager#isInteractive at the end of the call. |
| 4874 | optional bool screen_interactive = 10; |
Marcin Oczeretko | c06331a | 2018-10-02 13:00:38 +0100 | [diff] [blame] | 4875 | |
| 4876 | // Max recorded CPU usage of all processed messages. |
| 4877 | optional int64 recorded_max_cpu_micros = 11; |
| 4878 | |
| 4879 | // Max recorded latency of all processed messages. |
| 4880 | optional int64 recorded_max_latency_micros = 12; |
| 4881 | |
| 4882 | // Total number of messages we tracked the dispatching delay for. If we |
| 4883 | // collected data for all the messages, message_count will be equal to |
| 4884 | // recorded_delay_message_count. |
| 4885 | // |
| 4886 | // If recorded_delay_message_count is different than message_count, it means data |
| 4887 | // collection has been sampled or/and not all messages specified the target dispatch time. |
| 4888 | // The fields below will be sampled in this case. |
| 4889 | optional int64 recorded_delay_message_count = 13; |
| 4890 | |
| 4891 | // Total dispatching delay of all processed messages. |
| 4892 | // Calculated as a difference between the target dispatching time (Message.when) |
| 4893 | // and the actual dispatching time. |
| 4894 | // Average can be computed using recorded_total_delay_millis / recorded_delay_message_count. |
| 4895 | optional int64 recorded_total_delay_millis = 14; |
| 4896 | |
| 4897 | // Max dispatching delay of all processed messages. |
| 4898 | // Calculated as a difference between the target dispatching time (Message.when) |
| 4899 | // and the actual dispatching time. |
| 4900 | optional int64 recorded_max_delay_millis = 15; |
Marcin Oczeretko | d8cc859 | 2018-08-22 16:07:36 +0100 | [diff] [blame] | 4901 | } |
Tej Singh | 86dc9db | 2018-09-06 00:39:57 +0000 | [diff] [blame] | 4902 | |
| 4903 | /** |
| 4904 | * Pulls disk information, such as write speed and latency. |
| 4905 | */ |
| 4906 | message DiskStats { |
| 4907 | // Time taken to open, write 512B to, and close a file. |
| 4908 | // -1 if error performing the check. |
| 4909 | optional int64 data_write_latency_millis = 1; |
| 4910 | |
| 4911 | optional bool file_based_encryption = 2; |
| 4912 | |
| 4913 | // Recent disk write speed in kB/s. |
| 4914 | // -1 if error querying storageed. |
| 4915 | // 0 if data is unavailable. |
| 4916 | optional int32 recent_disk_write_speed = 3; |
| 4917 | } |
| 4918 | |
| 4919 | |
| 4920 | /** |
| 4921 | * Free and total bytes of the Data, Cache, and System partition. |
| 4922 | */ |
| 4923 | message DirectoryUsage { |
| 4924 | enum Directory { |
| 4925 | UNKNOWN = 0; |
| 4926 | DATA = 1; |
| 4927 | CACHE = 2; |
| 4928 | SYSTEM = 3; |
| 4929 | } |
| 4930 | optional Directory directory = 1; |
| 4931 | optional int64 free_bytes = 2; |
| 4932 | optional int64 total_bytes = 3; |
| 4933 | } |
| 4934 | |
| 4935 | |
| 4936 | /** |
| 4937 | * Size of an application: apk size, data size, and cache size. |
| 4938 | * Reads from a cached file produced daily by DiskStatsLoggingService.java. |
| 4939 | * Information is only reported for apps with the primary user (user 0). |
| 4940 | * Sizes are aggregated by package name. |
| 4941 | */ |
| 4942 | message AppSize { |
| 4943 | // Including uids will involve modifying diskstats logic. |
| 4944 | optional string package_name = 1; |
| 4945 | // App size in bytes. -1 if unavailable. |
| 4946 | optional int64 app_size_bytes = 2; |
| 4947 | // App data size in bytes. -1 if unavailable. |
| 4948 | optional int64 app_data_size_bytes = 3; |
| 4949 | // App cache size in bytes. -1 if unavailable. |
| 4950 | optional int64 app_cache_size_bytes = 4; |
| 4951 | // Time that the cache file was produced. |
| 4952 | // Uses System.currentTimeMillis(), which is wall clock time. |
| 4953 | optional int64 cache_time_millis = 5; |
| 4954 | } |
| 4955 | |
| 4956 | |
| 4957 | /** |
| 4958 | * Size of a particular category. Eg: photos, videos. |
| 4959 | * Reads from a cached file produced daily by DiskStatsLoggingService.java. |
| 4960 | */ |
| 4961 | message CategorySize { |
| 4962 | enum Category { |
| 4963 | UNKNOWN = 0; |
| 4964 | APP_SIZE = 1; |
| 4965 | APP_DATA_SIZE = 2; |
| 4966 | APP_CACHE_SIZE = 3; |
| 4967 | PHOTOS = 4; |
| 4968 | VIDEOS = 5; |
| 4969 | AUDIO = 6; |
| 4970 | DOWNLOADS = 7; |
| 4971 | SYSTEM = 8; |
| 4972 | OTHER = 9; |
| 4973 | } |
| 4974 | optional Category category = 1; |
| 4975 | // Category size in bytes. |
| 4976 | optional int64 size_bytes = 2; |
| 4977 | // Time that the cache file was produced. |
| 4978 | // Uses System.currentTimeMillis(), which is wall clock time. |
| 4979 | optional int64 cache_time_millis = 3; |
| 4980 | } |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 4981 | |
| 4982 | /** |
Tej Singh | e7726dc | 2018-09-21 11:42:12 -0700 | [diff] [blame] | 4983 | * Pulls per uid I/O stats. The stats are cumulative since boot. |
| 4984 | * |
| 4985 | * Read/write bytes are I/O events from a storage device |
| 4986 | * Read/write chars are data requested by read/write syscalls, and can be |
| 4987 | * satisfied by caching. |
| 4988 | * |
| 4989 | * Pulled from StatsCompanionService, which reads proc/uid_io/stats. |
| 4990 | */ |
| 4991 | message DiskIo { |
| 4992 | optional int32 uid = 1 [(is_uid) = true]; |
| 4993 | optional int64 fg_chars_read = 2; |
| 4994 | optional int64 fg_chars_write = 3; |
| 4995 | optional int64 fg_bytes_read = 4; |
| 4996 | optional int64 fg_bytes_write = 5; |
| 4997 | optional int64 bg_chars_read = 6; |
| 4998 | optional int64 bg_chars_write = 7; |
| 4999 | optional int64 bg_bytes_read = 8; |
| 5000 | optional int64 bg_bytes_write = 9; |
| 5001 | optional int64 fg_fsync = 10; |
| 5002 | optional int64 bg_fsync= 11; |
| 5003 | } |
| 5004 | |
| 5005 | |
| 5006 | /** |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 5007 | * Pulls the number of fingerprints for each user. |
| 5008 | * |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 5009 | * Pulled from StatsCompanionService, which queries <Biometric>Manager. |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 5010 | */ |
joshmccloskey | 5dcb408 | 2019-02-26 15:28:37 -0800 | [diff] [blame] | 5011 | message NumFingerprintsEnrolled { |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 5012 | // The associated user. Eg: 0 for owners, 10+ for others. |
| 5013 | // Defined in android/os/UserHandle.java |
| 5014 | optional int32 user = 1; |
| 5015 | // Number of fingerprints registered to that user. |
joshmccloskey | 5dcb408 | 2019-02-26 15:28:37 -0800 | [diff] [blame] | 5016 | optional int32 num_fingerprints_enrolled = 2; |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 5017 | } |
Chenjie Yu | 12e5e67 | 2018-09-14 15:54:59 -0700 | [diff] [blame] | 5018 | |
Philip P. Moltmann | 70b42ae | 2019-01-29 16:24:19 -0800 | [diff] [blame] | 5019 | /** |
joshmccloskey | 5dcb408 | 2019-02-26 15:28:37 -0800 | [diff] [blame] | 5020 | * Pulls the number of faces for each user. |
| 5021 | * |
| 5022 | * Pulled from StatsCompanionService, which queries <Biometric>Manager. |
| 5023 | */ |
| 5024 | message NumFacesEnrolled { |
| 5025 | // The associated user. Eg: 0 for owners, 10+ for others. |
| 5026 | // Defined in android/os/UserHandle.java |
| 5027 | optional int32 user = 1; |
| 5028 | // Number of faces registered to that user. |
| 5029 | optional int32 num_faces_enrolled = 2; |
| 5030 | } |
| 5031 | /** |
Philip P. Moltmann | 70b42ae | 2019-01-29 16:24:19 -0800 | [diff] [blame] | 5032 | * A mapping of role holder -> role |
| 5033 | */ |
| 5034 | message RoleHolder { |
| 5035 | // uid of the role holder |
| 5036 | optional int32 uid = 1 [(is_uid) = true]; |
| 5037 | |
| 5038 | // package name of the role holder |
| 5039 | optional string package_name = 2; |
| 5040 | |
| 5041 | // the role held |
| 5042 | optional string role = 3; |
| 5043 | } |
| 5044 | |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 5045 | message AggStats { |
Richard Gaywood | a8fe1b4 | 2019-12-05 11:31:02 +0000 | [diff] [blame] | 5046 | // These are all in byte resolution. |
| 5047 | optional int64 min = 1 [deprecated = true]; |
| 5048 | optional int64 average = 2 [deprecated = true]; |
| 5049 | optional int64 max = 3 [deprecated = true]; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 5050 | |
Richard Gaywood | a8fe1b4 | 2019-12-05 11:31:02 +0000 | [diff] [blame] | 5051 | // These are all in kilobyte resolution. Can fit in int32, so smaller on the wire than the above |
| 5052 | // int64 fields. |
| 5053 | optional int32 mean_kb = 4; |
| 5054 | optional int32 max_kb = 5; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 5055 | } |
| 5056 | |
Richard Gaywood | a8fe1b4 | 2019-12-05 11:31:02 +0000 | [diff] [blame] | 5057 | // A reduced subset of process states; reducing the number of possible states allows more |
| 5058 | // aggressive device-side aggregation of statistics and hence reduces metric upload size. |
| 5059 | enum ProcessStateAggregated { |
| 5060 | PROCESS_STATE_UNKNOWN = 0; |
| 5061 | // Persistent system process. |
| 5062 | PROCESS_STATE_PERSISTENT = 1; |
| 5063 | // Top activity; actually any visible activity. |
| 5064 | PROCESS_STATE_TOP = 2; |
| 5065 | // Process binding to top or a foreground service. |
| 5066 | PROCESS_STATE_BOUND_TOP_OR_FGS = 3; |
| 5067 | // Processing running a foreground service. |
| 5068 | PROCESS_STATE_FGS = 4; |
| 5069 | // Important foreground process (ime, wallpaper, etc). |
| 5070 | PROCESS_STATE_IMPORTANT_FOREGROUND = 5; |
| 5071 | // Important background process. |
| 5072 | PROCESS_STATE_BACKGROUND = 6; |
| 5073 | // Process running a receiver. |
| 5074 | PROCESS_STATE_RECEIVER = 7; |
| 5075 | // All kinds of cached processes. |
| 5076 | PROCESS_STATE_CACHED = 8; |
| 5077 | } |
| 5078 | |
| 5079 | // Next tag: 13 |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 5080 | message ProcessStatsStateProto { |
| 5081 | optional android.service.procstats.ScreenState screen_state = 1; |
| 5082 | |
Richard Gaywood | a8fe1b4 | 2019-12-05 11:31:02 +0000 | [diff] [blame] | 5083 | optional android.service.procstats.MemoryState memory_state = 2 [deprecated = true]; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 5084 | |
| 5085 | // this enum list is from frameworks/base/core/java/com/android/internal/app/procstats/ProcessStats.java |
| 5086 | // and not frameworks/base/core/java/android/app/ActivityManager.java |
Richard Gaywood | a8fe1b4 | 2019-12-05 11:31:02 +0000 | [diff] [blame] | 5087 | optional android.service.procstats.ProcessState process_state = 3 [deprecated = true]; |
| 5088 | |
| 5089 | optional ProcessStateAggregated process_state_aggregated = 10; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 5090 | |
| 5091 | // Millisecond uptime duration spent in this state |
Richard Gaywood | a8fe1b4 | 2019-12-05 11:31:02 +0000 | [diff] [blame] | 5092 | optional int64 duration_millis = 4 [deprecated = true]; |
| 5093 | // Same as above, but with minute resolution so it fits into an int32. |
| 5094 | optional int32 duration_minutes = 11; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 5095 | |
| 5096 | // Millisecond elapsed realtime duration spent in this state |
Richard Gaywood | a8fe1b4 | 2019-12-05 11:31:02 +0000 | [diff] [blame] | 5097 | optional int64 realtime_duration_millis = 9 [deprecated = true]; |
| 5098 | // Same as above, but with minute resolution so it fits into an int32. |
| 5099 | optional int32 realtime_duration_minutes = 12; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 5100 | |
| 5101 | // # of samples taken |
| 5102 | optional int32 sample_size = 5; |
| 5103 | |
| 5104 | // PSS is memory reserved for this process |
Richard Gaywood | a8fe1b4 | 2019-12-05 11:31:02 +0000 | [diff] [blame] | 5105 | optional AggStats pss = 6 [deprecated = true]; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 5106 | |
| 5107 | // USS is memory shared between processes, divided evenly for accounting |
Richard Gaywood | a8fe1b4 | 2019-12-05 11:31:02 +0000 | [diff] [blame] | 5108 | optional AggStats uss = 7 [deprecated = true]; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 5109 | |
| 5110 | // RSS is memory resident for this process |
| 5111 | optional AggStats rss = 8; |
| 5112 | } |
| 5113 | |
| 5114 | // Next Tag: 7 |
| 5115 | message ProcessStatsProto { |
| 5116 | // Name of process. |
| 5117 | optional string process = 1; |
| 5118 | |
| 5119 | // Uid of the process. |
| 5120 | optional int32 uid = 2; |
| 5121 | |
| 5122 | // Information about how often kills occurred |
| 5123 | message Kill { |
| 5124 | // Count of excessive CPU kills |
| 5125 | optional int32 cpu = 1; |
| 5126 | |
| 5127 | // Count of kills when cached |
| 5128 | optional int32 cached = 2; |
| 5129 | |
| 5130 | // PSS stats during cached kill |
| 5131 | optional AggStats cached_pss = 3; |
| 5132 | } |
Richard Gaywood | a8fe1b4 | 2019-12-05 11:31:02 +0000 | [diff] [blame] | 5133 | optional Kill kill = 3 [deprecated = true]; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 5134 | |
| 5135 | // Time and memory spent in various states. |
| 5136 | repeated ProcessStatsStateProto states = 5; |
| 5137 | |
| 5138 | // Total time process has been running... screen_state, memory_state, and process_state |
| 5139 | // will not be set. |
| 5140 | optional ProcessStatsStateProto total_running_state = 6; |
| 5141 | } |
| 5142 | |
| 5143 | message PackageServiceOperationStatsProto { |
| 5144 | // Operate enum: Started, Foreground, Bound, Executing |
| 5145 | optional android.service.procstats.ServiceOperationState operation = 1; |
| 5146 | |
| 5147 | // Number of times the service was in this operation. |
| 5148 | optional int32 count = 2; |
| 5149 | |
| 5150 | // Information about a state the service can be in. |
| 5151 | message StateStats { |
| 5152 | // Screen state enum. |
| 5153 | optional android.service.procstats.ScreenState screen_state = 1; |
| 5154 | // Memory state enum. |
| 5155 | optional android.service.procstats.MemoryState memory_state = 2; |
| 5156 | |
| 5157 | // duration in milliseconds. |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 5158 | optional int64 duration_millis = 3; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 5159 | // Millisecond elapsed realtime duration spent in this state |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 5160 | optional int64 realtime_duration_millis = 4; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 5161 | } |
| 5162 | repeated StateStats state_stats = 3; |
| 5163 | } |
| 5164 | |
| 5165 | message PackageServiceStatsProto { |
| 5166 | // Name of service component. |
| 5167 | optional string service_name = 1; |
| 5168 | |
| 5169 | // The operation stats. |
| 5170 | // The package_name, package_uid, package_version, service_name will not be set to save space. |
| 5171 | repeated PackageServiceOperationStatsProto operation_stats = 2; |
| 5172 | } |
| 5173 | |
| 5174 | message PackageAssociationSourceProcessStatsProto { |
| 5175 | // Uid of the process. |
| 5176 | optional int32 process_uid = 1; |
| 5177 | // Process name. |
| 5178 | optional string process_name = 2; |
Chenjie Yu | b2ecc79 | 2019-01-17 10:27:26 -0800 | [diff] [blame] | 5179 | // Package name. |
| 5180 | optional string package_name = 7; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 5181 | // Total count of the times this association appeared. |
| 5182 | optional int32 total_count = 3; |
| 5183 | |
| 5184 | // Millisecond uptime total duration this association was around. |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 5185 | optional int64 total_duration_millis = 4; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 5186 | |
| 5187 | // Total count of the times this association became actively impacting its target process. |
| 5188 | optional int32 active_count = 5; |
| 5189 | |
| 5190 | // Information on one source in this association. |
| 5191 | message StateStats { |
| 5192 | // Process state enum. |
| 5193 | optional android.service.procstats.ProcessState process_state = 1; |
| 5194 | // Millisecond uptime duration spent in this state |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 5195 | optional int64 duration_millis = 2; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 5196 | // Millisecond elapsed realtime duration spent in this state |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 5197 | optional int64 realtime_duration_mmillis = 3; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 5198 | } |
| 5199 | repeated StateStats active_state_stats = 6; |
| 5200 | } |
| 5201 | |
| 5202 | message PackageAssociationProcessStatsProto { |
| 5203 | // Name of the target component. |
| 5204 | optional string component_name = 1; |
| 5205 | // Information on one source in this association. |
| 5206 | repeated PackageAssociationSourceProcessStatsProto sources = 2; |
| 5207 | } |
| 5208 | |
| 5209 | |
| 5210 | message ProcessStatsPackageProto { |
| 5211 | // Name of package. |
| 5212 | optional string package = 1; |
| 5213 | |
| 5214 | // Uid of the package. |
| 5215 | optional int32 uid = 2; |
| 5216 | |
| 5217 | // Version of the package. |
| 5218 | optional int64 version = 3; |
| 5219 | |
| 5220 | // Stats for each process running with the package loaded in to it. |
| 5221 | repeated ProcessStatsProto process_stats = 4; |
| 5222 | |
| 5223 | // Stats for each of the package's services. |
| 5224 | repeated PackageServiceStatsProto service_stats = 5; |
| 5225 | |
| 5226 | // Stats for each association with the package. |
| 5227 | repeated PackageAssociationProcessStatsProto association_stats = 6; |
| 5228 | } |
| 5229 | |
| 5230 | message ProcessStatsSectionProto { |
| 5231 | // Elapsed realtime at start of report. |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 5232 | optional int64 start_realtime_millis = 1; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 5233 | |
| 5234 | // Elapsed realtime at end of report. |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 5235 | optional int64 end_realtime_millis = 2; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 5236 | |
| 5237 | // CPU uptime at start of report. |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 5238 | optional int64 start_uptime_millis = 3; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 5239 | |
| 5240 | // CPU uptime at end of report. |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 5241 | optional int64 end_uptime_millis = 4; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 5242 | |
| 5243 | // System runtime library. e.g. "libdvm.so", "libart.so". |
| 5244 | optional string runtime = 5; |
| 5245 | |
| 5246 | // whether kernel reports swapped pss. |
| 5247 | optional bool has_swapped_pss = 6; |
| 5248 | |
| 5249 | // Data completeness. e.g. "complete", "partial", shutdown", or "sysprops". |
| 5250 | enum Status { |
| 5251 | STATUS_UNKNOWN = 0; |
| 5252 | STATUS_COMPLETE = 1; |
| 5253 | STATUS_PARTIAL = 2; |
| 5254 | STATUS_SHUTDOWN = 3; |
| 5255 | STATUS_SYSPROPS = 4; |
| 5256 | } |
| 5257 | repeated Status status = 7; |
| 5258 | |
Chenjie Yu | b2ecc79 | 2019-01-17 10:27:26 -0800 | [diff] [blame] | 5259 | // Number of pages available of various types and sizes, representation fragmentation. |
| 5260 | repeated ProcessStatsAvailablePagesProto available_pages = 10; |
| 5261 | |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 5262 | // Stats for each process. |
| 5263 | repeated ProcessStatsProto process_stats = 8; |
| 5264 | |
| 5265 | // Stats for each package. |
| 5266 | repeated ProcessStatsPackageProto package_stats = 9; |
| 5267 | } |
| 5268 | |
Chenjie Yu | b2ecc79 | 2019-01-17 10:27:26 -0800 | [diff] [blame] | 5269 | message ProcessStatsAvailablePagesProto { |
| 5270 | // Node these pages are in (as per /proc/pagetypeinfo) |
| 5271 | optional int32 node = 1; |
| 5272 | |
| 5273 | // Zone these pages are in (as per /proc/pagetypeinfo) |
| 5274 | optional string zone = 2; |
| 5275 | |
| 5276 | // Label for the type of these pages (as per /proc/pagetypeinfo) |
| 5277 | optional string label = 3; |
| 5278 | |
| 5279 | // Distribution of number of pages available by order size. First entry in array is |
| 5280 | // order 0, second is order 1, etc. Each order increase is a doubling of page size. |
| 5281 | repeated int32 pages_per_order = 4; |
| 5282 | } |
| 5283 | |
Chenjie Yu | 12e5e67 | 2018-09-14 15:54:59 -0700 | [diff] [blame] | 5284 | /** |
| 5285 | * Pulled from ProcessStatsService.java |
| 5286 | */ |
| 5287 | message ProcStats { |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 5288 | optional ProcessStatsSectionProto proc_stats_section = 1; |
| 5289 | } |
| 5290 | |
Chenjie Yu | f910b780 | 2019-01-11 16:08:20 -0800 | [diff] [blame] | 5291 | /** |
| 5292 | * Pulled from ProcessStatsService.java |
| 5293 | */ |
| 5294 | message ProcStatsPkgProc { |
| 5295 | optional ProcessStatsSectionProto proc_stats_section = 1; |
| 5296 | } |
| 5297 | |
Chris Wren | cdea3b7 | 2019-11-22 16:58:17 -0500 | [diff] [blame] | 5298 | // Next Tag: 2 |
| 5299 | message PackageRemoteViewInfoProto { |
| 5300 | optional string package_name = 1; |
| 5301 | // add per-package additional info here (like channels) |
| 5302 | } |
| 5303 | |
| 5304 | // Next Tag: 2 |
| 5305 | message NotificationRemoteViewsProto { |
| 5306 | repeated PackageRemoteViewInfoProto package_remote_view_info = 1; |
| 5307 | } |
| 5308 | |
| 5309 | /** |
| 5310 | * Pulled from NotificationManagerService.java |
| 5311 | */ |
| 5312 | message NotificationRemoteViews { |
| 5313 | optional NotificationRemoteViewsProto notification_remote_views = 1; |
| 5314 | } |
| 5315 | |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 5316 | message PowerProfileProto { |
| 5317 | optional double cpu_suspend = 1; |
| 5318 | |
| 5319 | optional double cpu_idle = 2; |
| 5320 | |
| 5321 | optional double cpu_active = 3; |
| 5322 | |
| 5323 | message CpuCluster { |
| 5324 | optional int32 id = 1; |
| 5325 | optional double cluster_power = 2; |
| 5326 | optional int32 cores = 3; |
| 5327 | repeated int64 speed = 4; |
| 5328 | repeated double core_power = 5; |
| 5329 | } |
| 5330 | |
| 5331 | repeated CpuCluster cpu_cluster = 40; |
| 5332 | |
| 5333 | optional double wifi_scan = 4; |
| 5334 | |
| 5335 | optional double wifi_on = 5; |
| 5336 | |
| 5337 | optional double wifi_active = 6; |
| 5338 | |
| 5339 | optional double wifi_controller_idle = 7; |
| 5340 | |
| 5341 | optional double wifi_controller_rx = 8; |
| 5342 | |
| 5343 | optional double wifi_controller_tx = 9; |
| 5344 | |
| 5345 | repeated double wifi_controller_tx_levels = 10; |
| 5346 | |
| 5347 | optional double wifi_controller_operating_voltage = 11; |
| 5348 | |
| 5349 | optional double bluetooth_controller_idle = 12; |
| 5350 | |
| 5351 | optional double bluetooth_controller_rx = 13; |
| 5352 | |
| 5353 | optional double bluetooth_controller_tx = 14; |
| 5354 | |
| 5355 | optional double bluetooth_controller_operating_voltage = 15; |
| 5356 | |
| 5357 | optional double modem_controller_sleep = 16; |
| 5358 | |
| 5359 | optional double modem_controller_idle = 17; |
| 5360 | |
| 5361 | optional double modem_controller_rx = 18; |
| 5362 | |
| 5363 | repeated double modem_controller_tx = 19; |
| 5364 | |
| 5365 | optional double modem_controller_operating_voltage = 20; |
| 5366 | |
| 5367 | optional double gps_on = 21; |
| 5368 | |
| 5369 | repeated double gps_signal_quality_based = 22; |
| 5370 | |
| 5371 | optional double gps_operating_voltage = 23; |
| 5372 | |
| 5373 | optional double bluetooth_on = 24; |
| 5374 | |
| 5375 | optional double bluetooth_active = 25; |
| 5376 | |
| 5377 | optional double bluetooth_at_cmd = 26; |
| 5378 | |
| 5379 | optional double ambient_display = 27; |
| 5380 | |
| 5381 | optional double screen_on = 28; |
| 5382 | |
| 5383 | optional double radio_on = 29; |
| 5384 | |
| 5385 | optional double radio_scanning = 30; |
| 5386 | |
| 5387 | optional double radio_active = 31; |
| 5388 | |
| 5389 | optional double screen_full = 32; |
| 5390 | |
| 5391 | optional double audio = 33; |
| 5392 | |
| 5393 | optional double video = 34; |
| 5394 | |
| 5395 | optional double flashlight = 35; |
| 5396 | |
| 5397 | optional double memory = 36; |
| 5398 | |
| 5399 | optional double camera = 37; |
| 5400 | |
| 5401 | optional double wifi_batched_scan = 38; |
| 5402 | |
| 5403 | optional double battery_capacity = 39; |
Chenjie Yu | 12e5e67 | 2018-09-14 15:54:59 -0700 | [diff] [blame] | 5404 | } |
Chenjie Yu | ab53020 | 2018-09-26 12:39:20 -0700 | [diff] [blame] | 5405 | |
| 5406 | /** |
| 5407 | * power_profile.xml and other constants for power model calculations. |
| 5408 | * Pulled from PowerProfile.java |
| 5409 | */ |
| 5410 | message PowerProfile { |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 5411 | optional PowerProfileProto power_profile = 1; |
Howard Ro | 9a862de | 2018-10-11 16:03:33 -0700 | [diff] [blame] | 5412 | } |
Chenjie Yu | b35b5f7 | 2018-10-13 23:25:11 -0700 | [diff] [blame] | 5413 | |
| 5414 | /** |
arangelov | d5db50e | 2018-10-12 20:24:39 +0100 | [diff] [blame] | 5415 | * Logs when a user restriction was added or removed. |
| 5416 | * |
| 5417 | * Logged from: |
| 5418 | * frameworks/base/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java |
| 5419 | */ |
| 5420 | message UserRestrictionChanged { |
| 5421 | // The raw string of the user restriction as defined in UserManager. |
| 5422 | // Allowed values are defined in UserRestrictionsUtils#USER_RESTRICTIONS. |
| 5423 | optional string restriction = 1; |
| 5424 | // Whether the restriction is enabled or disabled. |
| 5425 | optional bool enabled = 2; |
Howard Ro | 183c2bd | 2018-10-18 13:52:10 -0700 | [diff] [blame] | 5426 | } |
Yangster-mac | 308ea0c | 2018-10-22 13:10:25 -0700 | [diff] [blame] | 5427 | |
| 5428 | /** |
| 5429 | * Pulls process user time and system time. Puller takes a snapshot of all pids |
| 5430 | * in the system and returns cpu stats for those that are working at the time. |
| 5431 | * Dead pids will be dropped. Kernel processes are excluded. |
| 5432 | * Min cool-down is 5 sec. |
| 5433 | */ |
| 5434 | message ProcessCpuTime { |
| 5435 | optional int32 uid = 1 [(is_uid) = true]; |
| 5436 | |
| 5437 | optional string process_name = 2; |
| 5438 | // Process cpu time in user space, cumulative from boot/process start |
| 5439 | optional int64 user_time_millis = 3; |
| 5440 | // Process cpu time in system space, cumulative from boot/process start |
| 5441 | optional int64 system_time_millis = 4; |
Rafal Slawik | bf67d07 | 2018-10-23 11:07:54 +0100 | [diff] [blame] | 5442 | } |
Misha Wagner | 5a51e00 | 2018-10-03 15:04:09 +0100 | [diff] [blame] | 5443 | |
| 5444 | /** |
| 5445 | * Pulls the CPU usage for each thread. |
| 5446 | * |
| 5447 | * Read from /proc/$PID/task/$TID/time_in_state files. |
| 5448 | * |
| 5449 | * TODO(mishaw): This is an experimental atom. Issues with big/little CPU frequencies, and |
| 5450 | * time_in_state files not being present on some phones, have not been addressed. These should be |
| 5451 | * considered before a public release. |
| 5452 | */ |
| 5453 | message CpuTimePerThreadFreq { |
| 5454 | // UID that owns the process. |
| 5455 | optional int32 uid = 1 [(is_uid) = true]; |
| 5456 | // ID of the process. |
Misha Wagner | dfa548c | 2018-11-16 11:18:00 +0000 | [diff] [blame] | 5457 | optional int32 process_id = 2; |
Misha Wagner | 5a51e00 | 2018-10-03 15:04:09 +0100 | [diff] [blame] | 5458 | // ID of the thread. |
Misha Wagner | dfa548c | 2018-11-16 11:18:00 +0000 | [diff] [blame] | 5459 | optional int32 thread_id = 3; |
Misha Wagner | 5a51e00 | 2018-10-03 15:04:09 +0100 | [diff] [blame] | 5460 | // Name of the process taken from `/proc/$PID/cmdline`. |
| 5461 | optional string process_name = 4; |
| 5462 | // Name of the thread taken from `/proc/$PID/task/$TID/comm` |
| 5463 | optional string thread_name = 5; |
Misha Wagner | fde6958 | 2018-11-28 13:26:32 +0000 | [diff] [blame] | 5464 | |
| 5465 | // Report eight different frequencies, and how much time is spent in each frequency. Frequencies |
| 5466 | // are given in KHz, and time is given in milliseconds since the thread started. All eight |
| 5467 | // frequencies are given here as the alternative is sending eight separate atoms. This method |
| 5468 | // significantly reduces the amount of data created |
| 5469 | optional int32 frequency1_khz = 6; |
| 5470 | optional int32 time1_millis = 7; |
| 5471 | optional int32 frequency2_khz = 8; |
| 5472 | optional int32 time2_millis = 9; |
| 5473 | optional int32 frequency3_khz = 10; |
| 5474 | optional int32 time3_millis = 11; |
| 5475 | optional int32 frequency4_khz = 12; |
| 5476 | optional int32 time4_millis = 13; |
| 5477 | optional int32 frequency5_khz = 14; |
| 5478 | optional int32 time5_millis = 15; |
| 5479 | optional int32 frequency6_khz = 16; |
| 5480 | optional int32 time6_millis = 17; |
| 5481 | optional int32 frequency7_khz = 18; |
| 5482 | optional int32 time7_millis = 19; |
| 5483 | optional int32 frequency8_khz = 20; |
| 5484 | optional int32 time8_millis = 21; |
Misha Wagner | 5a51e00 | 2018-10-03 15:04:09 +0100 | [diff] [blame] | 5485 | } |
Bookatz | 75ee604 | 2018-11-09 12:27:37 -0800 | [diff] [blame] | 5486 | |
| 5487 | /** |
Bookatz | 366a443 | 2018-11-20 09:42:33 -0800 | [diff] [blame] | 5488 | * Pulls information about the device's build. |
| 5489 | */ |
| 5490 | message BuildInformation { |
| 5491 | // Build.FINGERPRINT. A string that uniquely identifies this build. Do not parse. |
| 5492 | // E.g. may be composed of the brand, product, device, release, id, incremental, type, and tags. |
| 5493 | optional string fingerprint = 1; |
| 5494 | |
| 5495 | // Build.BRAND. The consumer-visible brand with which the product/hardware will be associated. |
| 5496 | optional string brand = 2; |
| 5497 | |
| 5498 | // Build.PRODUCT. The name of the overall product. |
| 5499 | optional string product = 3; |
| 5500 | |
| 5501 | // Build.DEVICE. The name of the industrial design. |
| 5502 | optional string device = 4; |
| 5503 | |
| 5504 | // Build.VERSION.RELEASE. The user-visible version string. E.g., "1.0" or "3.4b5" or "bananas". |
| 5505 | optional string version_release = 5; |
| 5506 | |
| 5507 | // Build.ID. E.g. a label like "M4-rc20". |
| 5508 | optional string id = 6; |
| 5509 | |
| 5510 | // Build.VERSION.INCREMENTAL. The internal value used by the underlying source control to |
| 5511 | // represent this build. |
| 5512 | optional string version_incremental = 7; |
| 5513 | |
| 5514 | // Build.TYPE. The type of build, like "user" or "eng". |
| 5515 | optional string type = 8; |
| 5516 | |
| 5517 | // Build.TAGS. Comma-separated tags describing the build, like "unsigned,debug". |
| 5518 | optional string tags = 9; |
| 5519 | } |
| 5520 | |
| 5521 | /** |
Adam He | 420947c | 2019-01-23 15:59:09 -0800 | [diff] [blame] | 5522 | * Logs information about mismatched caller for content capture. |
| 5523 | * |
| 5524 | * Logged from: |
| 5525 | * frameworks/base/core/java/android/service/contentcapture/ContentCaptureService.java |
| 5526 | */ |
| 5527 | message ContentCaptureCallerMismatchReported { |
| 5528 | optional string intended_package = 1; |
| 5529 | optional string calling_package = 2; |
| 5530 | } |
| 5531 | |
| 5532 | /** |
| 5533 | * Logs information about content capture service events. |
| 5534 | * |
| 5535 | * Logged from: |
| 5536 | * frameworks/base/services/contentcapture/java/com/android/server/contentcapture/ContentCaptureMetricsLogger.java |
| 5537 | */ |
| 5538 | message ContentCaptureServiceEvents { |
| 5539 | // The type of event. |
| 5540 | enum Event { |
| 5541 | UNKNOWN = 0; |
| 5542 | ON_CONNECTED = 1; |
| 5543 | ON_DISCONNECTED = 2; |
| 5544 | SET_WHITELIST = 3; |
| 5545 | SET_DISABLED = 4; |
| 5546 | ON_USER_DATA_REMOVED = 5; |
| 5547 | } |
| 5548 | optional Event event = 1; |
| 5549 | // component/package of content capture service. |
| 5550 | optional string service_info = 2; |
| 5551 | // component/package of target. |
| 5552 | // it's a concatenated list of component/package for SET_WHITELIST event |
| 5553 | // separated by " ". |
| 5554 | optional string target_info = 3; |
| 5555 | } |
| 5556 | |
| 5557 | /** |
| 5558 | * Logs information about content capture session events. |
| 5559 | * |
| 5560 | * Logged from: |
| 5561 | * frameworks/base/services/contentcapture/java/com/android/server/contentcapture/ContentCaptureMetricsLogger.java |
| 5562 | */ |
| 5563 | message ContentCaptureSessionEvents { |
| 5564 | // The type of event. |
| 5565 | enum Event { |
| 5566 | UNKNOWN = 0; |
| 5567 | ON_SESSION_STARTED = 1; |
| 5568 | ON_SESSION_FINISHED = 2; |
| 5569 | SESSION_NOT_CREATED = 3; |
| 5570 | } |
| 5571 | optional int32 session_id = 1; |
| 5572 | optional Event event = 2; |
| 5573 | // (n/a on session finished) |
| 5574 | optional int32 state_flags = 3; |
| 5575 | // component/package of content capture service. |
| 5576 | optional string service_info = 4; |
| 5577 | // component/package of app. |
| 5578 | // (n/a on session finished) |
| 5579 | optional string app_info = 5; |
| 5580 | optional bool is_child_session = 6; |
| 5581 | } |
| 5582 | |
| 5583 | /** |
| 5584 | * Logs information about session being flushed. |
| 5585 | * |
| 5586 | * Logged from: |
| 5587 | * frameworks/base/services/contentcapture/java/com/android/server/contentcapture/ContentCaptureMetricsLogger.java |
| 5588 | */ |
| 5589 | message ContentCaptureFlushed { |
| 5590 | optional int32 session_id = 1; |
| 5591 | // component/package of content capture service. |
| 5592 | optional string service_info = 2; |
| 5593 | // component/package of app. |
| 5594 | optional string app_info = 3; |
| 5595 | // session start/finish events |
| 5596 | optional int32 child_session_started = 4; |
| 5597 | optional int32 child_session_finished = 5; |
| 5598 | // count of view events. |
| 5599 | optional int32 view_appeared_count = 6; |
| 5600 | optional int32 view_disappeared_count = 7; |
| 5601 | optional int32 view_text_changed_count = 8; |
| 5602 | |
| 5603 | // Flush stats. |
| 5604 | optional int32 max_events = 9; |
| 5605 | optional int32 idle_flush_freq = 10; |
| 5606 | optional int32 text_flush_freq = 11; |
| 5607 | optional int32 flush_reason = 12; |
| 5608 | } |
| 5609 | |
| 5610 | /** |
Bookatz | 75ee604 | 2018-11-09 12:27:37 -0800 | [diff] [blame] | 5611 | * Pulls on-device BatteryStats power use calculations for the overall device. |
| 5612 | */ |
| 5613 | message DeviceCalculatedPowerUse { |
Bookatz | 3dbc13a | 2018-12-21 12:16:51 -0800 | [diff] [blame] | 5614 | // Power used by the device in nAs (i.e. nanocoulombs (nC)), as computed by BatteryStats, since |
| 5615 | // BatteryStats last reset (i.e. roughly since device was last significantly charged). |
| 5616 | // Currently, this is from BatteryStatsHelper.getComputedPower() (not getTotalPower()). |
| 5617 | optional int64 computed_power_nano_amp_secs = 1; |
Bookatz | 75ee604 | 2018-11-09 12:27:37 -0800 | [diff] [blame] | 5618 | } |
| 5619 | |
| 5620 | /** |
| 5621 | * Pulls on-device BatteryStats power use calculations broken down by uid. |
| 5622 | * This atom should be complemented by DeviceCalculatedPowerBlameOther, which contains the power use |
| 5623 | * that is attributed to non-uid items. They must all be included to get the total power use. |
| 5624 | */ |
| 5625 | message DeviceCalculatedPowerBlameUid { |
| 5626 | // Uid being blamed. Note: isolated uids have already been mapped to host uid. |
| 5627 | optional int32 uid = 1 [(is_uid) = true]; |
| 5628 | |
Bookatz | 3dbc13a | 2018-12-21 12:16:51 -0800 | [diff] [blame] | 5629 | // Power used by this uid in nAs (i.e. nanocoulombs (nC)), as computed by BatteryStats, since |
| 5630 | // BatteryStats last reset (i.e. roughly since device was last significantly charged). |
| 5631 | optional int64 power_nano_amp_secs = 2; |
Bookatz | 75ee604 | 2018-11-09 12:27:37 -0800 | [diff] [blame] | 5632 | } |
| 5633 | |
| 5634 | /** |
| 5635 | * Pulls on-device BatteryStats power use calculations that are not due to a uid, broken down by |
| 5636 | * drain type. |
| 5637 | * This atom should be complemented by DeviceCalculatedPowerBlameUid, which contains the blame that |
| 5638 | * is attributed uids. They must all be included to get the total power use. |
| 5639 | */ |
| 5640 | message DeviceCalculatedPowerBlameOther { |
| 5641 | // The type of item whose power use is being reported. |
| 5642 | enum DrainType { |
| 5643 | AMBIENT_DISPLAY = 0; |
| 5644 | // reserved 1; reserved "APP"; // Logged instead in DeviceCalculatedPowerBlameUid. |
| 5645 | BLUETOOTH = 2; |
| 5646 | CAMERA = 3; |
| 5647 | // Cell-standby |
| 5648 | CELL = 4; |
| 5649 | FLASHLIGHT = 5; |
| 5650 | IDLE = 6; |
| 5651 | MEMORY = 7; |
| 5652 | // Amount that total computed drain exceeded the drain estimated using the |
| 5653 | // battery level changes and capacity. |
| 5654 | OVERCOUNTED = 8; |
| 5655 | PHONE = 9; |
| 5656 | SCREEN = 10; |
| 5657 | // Amount that total computed drain was below the drain estimated using the |
| 5658 | // battery level changes and capacity. |
| 5659 | UNACCOUNTED = 11; |
| 5660 | // reserved 12; reserved "USER"; // Entire drain for a user. This is NOT supported. |
| 5661 | WIFI = 13; |
| 5662 | } |
| 5663 | optional DrainType drain_type = 1; |
| 5664 | |
Bookatz | 3dbc13a | 2018-12-21 12:16:51 -0800 | [diff] [blame] | 5665 | // Power used by this item in nAs (i.e. nanocoulombs (nC)), as computed by BatteryStats, since |
| 5666 | // BatteryStats last reset (i.e. roughly since device was last significantly charged). |
| 5667 | optional int64 power_nano_amp_secs = 2; |
Rafal Slawik | 3bea895 | 2018-11-15 12:39:33 +0000 | [diff] [blame] | 5668 | } |
arangelov | 4e99406 | 2018-11-13 16:12:38 +0000 | [diff] [blame] | 5669 | |
| 5670 | /** |
| 5671 | * Logs device policy features. |
| 5672 | * |
| 5673 | * Logged from: |
| 5674 | * frameworks/base/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java |
| 5675 | * packages/apps/ManagedProvisioning/src/com/android/managedprovisioning/ |
| 5676 | */ |
| 5677 | message DevicePolicyEvent { |
| 5678 | // The event id - unique for each event. |
| 5679 | optional android.stats.devicepolicy.EventId event_id = 1; |
| 5680 | // The admin package name. |
| 5681 | optional string admin_package_name = 2; |
| 5682 | // A generic integer parameter. |
| 5683 | optional int32 integer_value = 3; |
| 5684 | // A generic boolean parameter. |
| 5685 | optional bool boolean_value = 4; |
| 5686 | // A parameter specifying a time period in milliseconds. |
| 5687 | optional uint64 time_period_millis = 5; |
| 5688 | // A parameter specifying a list of package names, bundle extras or string parameters. |
| 5689 | optional android.stats.devicepolicy.StringList string_list_value = 6 [(log_mode) = MODE_BYTES]; |
| 5690 | } |
shawnlin | ea5b66b | 2018-11-13 15:05:29 +0800 | [diff] [blame] | 5691 | |
| 5692 | /** |
| 5693 | * Logs when DocumentsUI is started, and how. Call this when DocumentsUI first starts up. |
| 5694 | * |
| 5695 | * Logged from: |
| 5696 | * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java |
| 5697 | */ |
| 5698 | message DocsUILaunchReported { |
| 5699 | optional android.stats.docsui.LaunchAction launch_action = 1; |
| 5700 | optional bool has_initial_uri = 2; |
| 5701 | optional android.stats.docsui.MimeType mime_type = 3; |
| 5702 | optional android.stats.docsui.Root initial_root = 4; |
| 5703 | } |
| 5704 | |
| 5705 | /** |
| 5706 | * Logs root/app visited event in file managers/picker. Call this when the user |
| 5707 | * taps on root/app in hamburger menu. |
| 5708 | * |
| 5709 | * Logged from: |
| 5710 | * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java |
| 5711 | */ |
| 5712 | message DocsUIRootVisitedReported { |
| 5713 | optional android.stats.docsui.ContextScope scope = 1; |
| 5714 | optional android.stats.docsui.Root root = 2; |
| 5715 | } |
| 5716 | |
| 5717 | /** |
| 5718 | * Logs file operation stats. Call this when a file operation has completed. |
| 5719 | * |
| 5720 | * Logged from: |
| 5721 | * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java |
| 5722 | */ |
| 5723 | message DocsUIFileOperationReported { |
| 5724 | optional android.stats.docsui.Provider provider = 1; |
| 5725 | optional android.stats.docsui.FileOperation file_op = 2; |
| 5726 | } |
| 5727 | |
| 5728 | /** |
| 5729 | * Logs file operation stats. Call this when a copy/move operation has completed with a specific |
| 5730 | * mode. |
| 5731 | * |
| 5732 | * Logged from: |
| 5733 | * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java |
| 5734 | */ |
| 5735 | message DocsUIFileOperationCopyMoveModeReported { |
| 5736 | optional android.stats.docsui.FileOperation file_op = 1; |
| 5737 | optional android.stats.docsui.CopyMoveOpMode mode = 2; |
| 5738 | } |
| 5739 | |
| 5740 | |
| 5741 | /** |
| 5742 | * Logs file sub operation stats. Call this when a file operation has failed. |
| 5743 | * |
| 5744 | * Logged from: |
| 5745 | * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java |
| 5746 | */ |
| 5747 | message DocsUIFileOperationFailureReported { |
| 5748 | optional android.stats.docsui.Authority authority = 1; |
| 5749 | optional android.stats.docsui.SubFileOperation sub_op = 2; |
| 5750 | } |
| 5751 | |
| 5752 | /** |
| 5753 | * Logs the cancellation of a file operation. Call this when a job is canceled |
| 5754 | * |
| 5755 | * Logged from: |
| 5756 | * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java |
| 5757 | */ |
| 5758 | message DocsUIFileOperationCanceledReported { |
| 5759 | optional android.stats.docsui.FileOperation file_op = 1; |
| 5760 | } |
| 5761 | |
| 5762 | /** |
| 5763 | * Logs startup time in milliseconds. |
| 5764 | * |
| 5765 | * Logged from: |
| 5766 | * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java |
| 5767 | */ |
| 5768 | message DocsUIStartupMsReported { |
| 5769 | optional int32 startup_millis = 1; |
| 5770 | } |
| 5771 | |
| 5772 | /** |
| 5773 | * Logs the action that was started by user. |
| 5774 | * |
| 5775 | * Logged from: |
| 5776 | * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java |
| 5777 | */ |
| 5778 | message DocsUIUserActionReported { |
| 5779 | optional android.stats.docsui.UserAction action = 1; |
| 5780 | } |
| 5781 | |
| 5782 | /** |
| 5783 | * Logs the invalid type when invalid scoped access is requested. |
| 5784 | * |
| 5785 | * Logged from: |
| 5786 | * package/app/DocumentsUI/src/com/android/documentsui/ScopedAccessMetrics.java |
| 5787 | */ |
| 5788 | message DocsUIInvalidScopedAccessRequestReported { |
| 5789 | optional android.stats.docsui.InvalidScopedAccess type = 1; |
Rafal Slawik | da51b93 | 2018-12-13 16:31:33 +0000 | [diff] [blame] | 5790 | } |
Ben Murdoch | bab399f | 2018-12-06 11:01:38 +0000 | [diff] [blame] | 5791 | |
| 5792 | /** |
shawnlin | a75e82d | 2019-01-07 10:31:12 +0800 | [diff] [blame] | 5793 | * Logs the package name that launches docsui picker mode. |
| 5794 | * |
| 5795 | * Logged from: |
| 5796 | * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java |
| 5797 | */ |
| 5798 | message DocsUIPickerLaunchedFromReported { |
| 5799 | optional string package_name = 1; |
| 5800 | } |
| 5801 | |
| 5802 | /** |
| 5803 | * Logs the search type. |
| 5804 | * |
| 5805 | * Logged from: |
| 5806 | * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java |
| 5807 | */ |
| 5808 | message DocsUISearchTypeReported { |
| 5809 | optional android.stats.docsui.SearchType search_type = 1; |
| 5810 | } |
| 5811 | |
| 5812 | /** |
| 5813 | * Logs the search mode. |
| 5814 | * |
| 5815 | * Logged from: |
| 5816 | * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java |
| 5817 | */ |
| 5818 | message DocsUISearchModeReported { |
| 5819 | optional android.stats.docsui.SearchMode search_mode = 1; |
| 5820 | } |
| 5821 | |
| 5822 | /** |
| 5823 | * Logs the pick result information. |
| 5824 | * |
| 5825 | * Logged from: |
| 5826 | * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java |
| 5827 | */ |
| 5828 | message DocsUIPickResultReported { |
| 5829 | optional int32 total_action_count = 1; |
| 5830 | optional int64 duration_millis = 2; |
| 5831 | optional int32 file_count= 3; |
| 5832 | optional bool is_searching = 4; |
| 5833 | optional android.stats.docsui.Root picked_from = 5; |
| 5834 | optional android.stats.docsui.MimeType mime_type = 6; |
| 5835 | optional int32 repeatedly_pick_times = 7; |
| 5836 | } |
| 5837 | |
| 5838 | /** |
Ben Murdoch | bab399f | 2018-12-06 11:01:38 +0000 | [diff] [blame] | 5839 | * Logs when an app's memory is compacted. |
| 5840 | * |
| 5841 | * Logged from: |
| 5842 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
| 5843 | */ |
| 5844 | message AppCompacted { |
| 5845 | // The pid of the process being compacted. |
| 5846 | optional int32 pid = 1; |
| 5847 | |
| 5848 | // The name of the process being compacted. |
| 5849 | optional string process_name = 2; |
| 5850 | |
| 5851 | // The type of compaction. |
| 5852 | enum Action { |
| 5853 | UNKNOWN = 0; |
| 5854 | SOME = 1; |
| 5855 | FULL = 2; |
Ben Murdoch | 35c1420 | 2019-04-09 11:00:53 +0100 | [diff] [blame] | 5856 | PERSISTENT = 3; |
| 5857 | BFGS = 4; |
Ben Murdoch | bab399f | 2018-12-06 11:01:38 +0000 | [diff] [blame] | 5858 | } |
Ben Murdoch | 01720b8 | 2018-12-19 18:03:44 +0000 | [diff] [blame] | 5859 | optional Action action = 3; |
Ben Murdoch | bab399f | 2018-12-06 11:01:38 +0000 | [diff] [blame] | 5860 | |
| 5861 | // Total RSS in kilobytes consumed by the process prior to compaction. |
| 5862 | optional int64 before_rss_total_kilobytes = 4; |
| 5863 | |
| 5864 | // File RSS in kilobytes consumed by the process prior to compaction. |
| 5865 | optional int64 before_rss_file_kilobytes = 5; |
| 5866 | |
| 5867 | // Anonymous RSS in kilobytes consumed by the process prior to compaction. |
| 5868 | optional int64 before_rss_anon_kilobytes = 6; |
| 5869 | |
| 5870 | // Swap in kilobytes consumed by the process prior to compaction. |
| 5871 | optional int64 before_swap_kilobytes = 7; |
| 5872 | |
| 5873 | // Total RSS in kilobytes consumed by the process after compaction. |
| 5874 | optional int64 after_rss_total_kilobytes = 8; |
| 5875 | |
| 5876 | // File RSS in kilobytes consumed by the process after compaction. |
| 5877 | optional int64 after_rss_file_kilobytes = 9; |
| 5878 | |
| 5879 | // Anonymous RSS in kilobytes consumed by the process after compaction. |
| 5880 | optional int64 after_rss_anon_kilobytes = 10; |
| 5881 | |
| 5882 | // Swap in kilobytes consumed by the process after compaction. |
| 5883 | optional int64 after_swap_kilobytes = 11; |
| 5884 | |
| 5885 | // The time taken to perform compaction in milliseconds. |
| 5886 | optional int64 time_to_compact_millis = 12; |
| 5887 | |
| 5888 | // The last compaction action performed for this app. |
| 5889 | optional Action last_action = 13; |
| 5890 | |
Ben Murdoch | 01720b8 | 2018-12-19 18:03:44 +0000 | [diff] [blame] | 5891 | // The last time that compaction was attempted on this process in milliseconds |
| 5892 | // since boot, not including sleep (see SystemClock.uptimeMillis()). |
| 5893 | optional int64 last_compact_timestamp_ms_since_boot = 14; |
Ben Murdoch | bab399f | 2018-12-06 11:01:38 +0000 | [diff] [blame] | 5894 | |
Ben Murdoch | 885c21b | 2019-03-15 18:02:04 +0000 | [diff] [blame] | 5895 | // 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] | 5896 | optional int32 oom_score_adj = 15; |
Ben Murdoch | bab399f | 2018-12-06 11:01:38 +0000 | [diff] [blame] | 5897 | |
| 5898 | // The process state at the time of compaction. |
| 5899 | optional android.app.ProcessStateEnum process_state = 16 [default = PROCESS_STATE_UNKNOWN]; |
Ben Murdoch | fdc5593 | 2019-01-30 10:43:15 +0000 | [diff] [blame] | 5900 | |
| 5901 | // Free ZRAM in kilobytes before compaction. |
| 5902 | optional int64 before_zram_free_kilobytes = 17; |
| 5903 | |
| 5904 | // Free ZRAM in kilobytes after compaction. |
| 5905 | optional int64 after_zram_free_kilobytes = 18; |
Ben Murdoch | bab399f | 2018-12-06 11:01:38 +0000 | [diff] [blame] | 5906 | } |
lifr | 157fc55 | 2018-12-12 16:38:04 +0800 | [diff] [blame] | 5907 | |
| 5908 | /** |
lifr | b6b90b6 | 2019-03-29 00:40:17 +0800 | [diff] [blame] | 5909 | * Logs a DNS lookup operation initiated by the system resolver on behalf of an application |
| 5910 | * invoking native APIs such as getaddrinfo() or Java APIs such as Network#getAllByName(). |
| 5911 | * |
lifr | 1f74b05 | 2019-04-16 22:16:30 +0800 | [diff] [blame] | 5912 | * The NetworkDnsEventReported message represents the entire lookup operation, which may |
| 5913 | * result one or more queries to the recursive DNS resolvers. Those are individually logged |
| 5914 | * in DnsQueryEvents to enable computing error rates and network latency and timeouts |
| 5915 | * broken up by query type, transport, network interface, etc. |
lifr | 157fc55 | 2018-12-12 16:38:04 +0800 | [diff] [blame] | 5916 | */ |
| 5917 | message NetworkDnsEventReported { |
lifr | 1f74b05 | 2019-04-16 22:16:30 +0800 | [diff] [blame] | 5918 | optional android.stats.dnsresolver.EventType event_type = 1; |
lifr | 157fc55 | 2018-12-12 16:38:04 +0800 | [diff] [blame] | 5919 | |
lifr | 1f74b05 | 2019-04-16 22:16:30 +0800 | [diff] [blame] | 5920 | optional android.stats.dnsresolver.ReturnCode return_code = 2; |
lifr | b6b90b6 | 2019-03-29 00:40:17 +0800 | [diff] [blame] | 5921 | |
| 5922 | // The latency in microseconds of the entire DNS lookup operation. |
lifr | 157fc55 | 2018-12-12 16:38:04 +0800 | [diff] [blame] | 5923 | optional int32 latency_micros = 3; |
lifr | b6b90b6 | 2019-03-29 00:40:17 +0800 | [diff] [blame] | 5924 | |
lifr | 1f74b05 | 2019-04-16 22:16:30 +0800 | [diff] [blame] | 5925 | // Only valid for event_type = EVENT_GETADDRINFO. |
| 5926 | optional int32 hints_ai_flags = 4; |
lifr | b6b90b6 | 2019-03-29 00:40:17 +0800 | [diff] [blame] | 5927 | |
lifr | 1f74b05 | 2019-04-16 22:16:30 +0800 | [diff] [blame] | 5928 | // Flags passed to android_res_nsend() defined in multinetwork.h |
| 5929 | // Only valid for event_type = EVENT_RESNSEND. |
| 5930 | optional int32 res_nsend_flags = 5; |
lifr | b6b90b6 | 2019-03-29 00:40:17 +0800 | [diff] [blame] | 5931 | |
lifr | ad9becc | 2019-05-20 11:04:41 +0800 | [diff] [blame] | 5932 | optional android.stats.dnsresolver.NetworkType network_type = 6; |
lifr | b6b90b6 | 2019-03-29 00:40:17 +0800 | [diff] [blame] | 5933 | |
| 5934 | // The DNS over TLS mode on a specific netId. |
lifr | 1f74b05 | 2019-04-16 22:16:30 +0800 | [diff] [blame] | 5935 | optional android.stats.dnsresolver.PrivateDnsModes private_dns_modes = 7; |
lifr | b6b90b6 | 2019-03-29 00:40:17 +0800 | [diff] [blame] | 5936 | |
| 5937 | // Additional pass-through fields opaque to statsd. |
| 5938 | // 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] | 5939 | optional android.stats.dnsresolver.DnsQueryEvents dns_query_events = 8 [(log_mode) = MODE_BYTES]; |
lifr | 2b9fab7 | 2019-07-20 15:28:28 +0800 | [diff] [blame] | 5940 | |
| 5941 | // The sample rate of DNS stats (to statsd) is 1/sampling_rate_denom. |
| 5942 | optional int32 sampling_rate_denom = 9; |
lifr | 157fc55 | 2018-12-12 16:38:04 +0800 | [diff] [blame] | 5943 | } |
Chiachang Wang | f6bedc2 | 2019-01-14 11:54:32 +0800 | [diff] [blame] | 5944 | |
| 5945 | /** |
| 5946 | * Logs when a data stall event occurs. |
| 5947 | * |
| 5948 | * Log from: |
| 5949 | * frameworks/base/services/core/java/com/android/server/connectivity/NetworkMonitor.java |
| 5950 | */ |
| 5951 | message DataStallEvent { |
| 5952 | // Data stall evaluation type. |
| 5953 | // See frameworks/base/services/core/java/com/android/server/connectivity/NetworkMonitor.java |
| 5954 | // Refer to the definition of DATA_STALL_EVALUATION_TYPE_*. |
| 5955 | optional int32 evaluation_type = 1; |
| 5956 | // See definition in data_stall_event.proto. |
| 5957 | optional com.android.server.connectivity.ProbeResult validation_result = 2; |
| 5958 | // See definition in data_stall_event.proto. |
| 5959 | optional android.net.NetworkCapabilitiesProto.Transport network_type = 3; |
| 5960 | // See definition in data_stall_event.proto. |
| 5961 | optional com.android.server.connectivity.WifiData wifi_info = 4 [(log_mode) = MODE_BYTES]; |
| 5962 | // See definition in data_stall_event.proto. |
| 5963 | optional com.android.server.connectivity.CellularData cell_info = 5 [(log_mode) = MODE_BYTES]; |
| 5964 | // See definition in data_stall_event.proto. |
| 5965 | optional com.android.server.connectivity.DnsEvent dns_event = 6 [(log_mode) = MODE_BYTES]; |
| 5966 | } |
Christian Brunschen | f86039e | 2018-12-21 12:26:14 +0000 | [diff] [blame] | 5967 | |
| 5968 | /* |
| 5969 | * Logs when RescueParty resets some set of experiment flags. |
| 5970 | * |
| 5971 | * Logged from: |
| 5972 | * frameworks/base/services/core/java/com/android/server/RescueParty.java |
| 5973 | */ |
| 5974 | message RescuePartyResetReported { |
| 5975 | // The rescue level of this reset. A value of 0 indicates missing or unknown level information. |
| 5976 | optional int32 rescue_level = 1; |
| 5977 | } |
Mathew Inwood | b375be5 | 2019-01-04 11:36:25 +0000 | [diff] [blame] | 5978 | |
| 5979 | /** |
| 5980 | * Logs when signed config is received from an APK, and if that config was applied successfully. |
| 5981 | * Logged from: |
| 5982 | * frameworks/base/services/core/java/com/android/server/signedconfig/SignedConfigService.java |
| 5983 | */ |
| 5984 | message SignedConfigReported { |
| 5985 | enum Type { |
| 5986 | UNKNOWN_TYPE = 0; |
| 5987 | GLOBAL_SETTINGS = 1; |
| 5988 | } |
| 5989 | optional Type type = 1; |
| 5990 | |
| 5991 | // The final status of the signed config received. |
| 5992 | enum Status { |
| 5993 | UNKNOWN_STATUS = 0; |
| 5994 | APPLIED = 1; |
| 5995 | BASE64_FAILURE_CONFIG = 2; |
| 5996 | BASE64_FAILURE_SIGNATURE = 3; |
| 5997 | SECURITY_EXCEPTION = 4; |
| 5998 | INVALID_CONFIG = 5; |
| 5999 | OLD_CONFIG = 6; |
| 6000 | SIGNATURE_CHECK_FAILED = 7; |
| 6001 | NOT_APPLICABLE = 8; |
Mathew Inwood | 610d096 | 2019-01-15 11:50:28 +0000 | [diff] [blame] | 6002 | SIGNATURE_CHECK_FAILED_PROD_KEY_ABSENT = 9; |
Mathew Inwood | b375be5 | 2019-01-04 11:36:25 +0000 | [diff] [blame] | 6003 | } |
| 6004 | optional Status status = 2; |
| 6005 | |
| 6006 | // The version of the signed config processed. |
| 6007 | optional int32 version = 3; |
| 6008 | |
| 6009 | // The package name that the config was extracted from. |
| 6010 | optional string from_package = 4; |
| 6011 | |
| 6012 | enum Key { |
| 6013 | NO_KEY = 0; |
| 6014 | DEBUG = 1; |
| 6015 | PRODUCTION = 2; |
| 6016 | } |
| 6017 | // Which key was used to verify the config. |
| 6018 | optional Key verified_with = 5; |
| 6019 | } |
Yu-Han Yang | 8a1b51d | 2018-12-26 22:18:31 -0800 | [diff] [blame] | 6020 | |
| 6021 | /* |
| 6022 | * Logs GNSS Network-Initiated (NI) location events. |
| 6023 | * |
| 6024 | * Logged from: |
| 6025 | * frameworks/base/services/core/java/com/android/server/location/GnssLocationProvider.java |
| 6026 | */ |
| 6027 | message GnssNiEventReported { |
| 6028 | // The type of GnssNiEvent. |
| 6029 | enum EventType { |
| 6030 | UNKNOWN = 0; |
| 6031 | NI_REQUEST = 1; |
| 6032 | NI_RESPONSE = 2; |
| 6033 | } |
| 6034 | optional EventType event_type = 1; |
| 6035 | |
| 6036 | // An ID generated by HAL to associate NI notifications and UI responses. |
| 6037 | optional int32 notification_id = 2; |
| 6038 | |
| 6039 | // 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] | 6040 | optional android.server.location.GnssNiType ni_type = 3; |
Yu-Han Yang | 8a1b51d | 2018-12-26 22:18:31 -0800 | [diff] [blame] | 6041 | |
| 6042 | // NI requires notification. |
| 6043 | optional bool need_notify = 4; |
| 6044 | |
| 6045 | // NI requires verification. |
| 6046 | optional bool need_verify = 5; |
| 6047 | |
| 6048 | // NI requires privacy override, no notification/minimal trace. |
| 6049 | optional bool privacy_override = 6; |
| 6050 | |
| 6051 | // Timeout period to wait for user response. Set to 0 for no timeout limit. Specified in |
| 6052 | // seconds. |
| 6053 | optional int32 timeout = 7; |
| 6054 | |
| 6055 | // Default response when timeout. |
Yu-Han Yang | 14d5fb4 | 2019-01-16 12:42:59 -0800 | [diff] [blame] | 6056 | optional android.server.location.GnssUserResponseType default_response = 8; |
Yu-Han Yang | 8a1b51d | 2018-12-26 22:18:31 -0800 | [diff] [blame] | 6057 | |
| 6058 | // String representing the requester of the network inititated location request. |
| 6059 | optional string requestor_id = 9; |
| 6060 | |
| 6061 | // Notification message text string representing the service(for eg. SUPL-service) who sent the |
| 6062 | // network initiated location request. |
| 6063 | optional string text = 10; |
| 6064 | |
| 6065 | // requestorId decoding scheme. |
Yu-Han Yang | 14d5fb4 | 2019-01-16 12:42:59 -0800 | [diff] [blame] | 6066 | optional android.server.location.GnssNiEncodingType requestor_id_encoding = 11; |
Yu-Han Yang | 8a1b51d | 2018-12-26 22:18:31 -0800 | [diff] [blame] | 6067 | |
| 6068 | // Notification message text decoding scheme. |
Yu-Han Yang | 14d5fb4 | 2019-01-16 12:42:59 -0800 | [diff] [blame] | 6069 | optional android.server.location.GnssNiEncodingType text_encoding = 12; |
Yu-Han Yang | 8a1b51d | 2018-12-26 22:18:31 -0800 | [diff] [blame] | 6070 | |
| 6071 | // True if SUPL ES is enabled. |
| 6072 | optional bool is_supl_es_enabled = 13; |
| 6073 | |
| 6074 | // True if GNSS location is enabled. |
| 6075 | optional bool is_location_enabled = 14; |
| 6076 | |
| 6077 | // GNSS NI responses which define the response in NI structures. |
Yu-Han Yang | 14d5fb4 | 2019-01-16 12:42:59 -0800 | [diff] [blame] | 6078 | optional android.server.location.GnssUserResponseType user_response = 15; |
| 6079 | } |
| 6080 | |
| 6081 | /** |
| 6082 | * Logs GNSS non-framework (NFW) location notification. |
| 6083 | * |
| 6084 | * Logged from: |
| 6085 | * frameworks/base/services/core/java/com/android/server/location/GnssLocationProvider.java |
| 6086 | */ |
| 6087 | message GnssNfwNotificationReported { |
| 6088 | // Package name of the Android proxy application representing the non-framework entity that |
| 6089 | // requested location. Set to empty string if unknown. |
| 6090 | optional string proxy_app_package_name = 1; |
| 6091 | |
| 6092 | // Protocol stack that initiated the non-framework location request. |
| 6093 | optional android.server.location.NfwProtocolStack protocol_stack = 2; |
| 6094 | |
| 6095 | // Name of the protocol stack if protocol_stack field is set to OTHER_PROTOCOL_STACK. Otherwise, |
| 6096 | // set to empty string. This field is opaque to the framework and used for logging purposes. |
| 6097 | optional string other_protocol_stack_name = 3; |
| 6098 | |
| 6099 | // Source initiating/receiving the location information. |
| 6100 | optional android.server.location.NfwRequestor requestor = 4; |
| 6101 | |
| 6102 | // Identity of the endpoint receiving the location information. For example, carrier name, OEM |
| 6103 | // name, SUPL SLP/E-SLP FQDN, chipset vendor name, etc. This field is opaque to the framework |
| 6104 | // and used for logging purposes. |
| 6105 | optional string requestor_id = 5; |
| 6106 | |
| 6107 | // Indicates whether location information was provided for this request. |
| 6108 | optional android.server.location.NfwResponseType response_type = 6; |
| 6109 | |
| 6110 | // True if the device is in user initiated emergency session. |
| 6111 | optional bool in_emergency_mode = 7; |
| 6112 | |
| 6113 | // True if cached location is provided. |
| 6114 | optional bool is_cached_location = 8; |
| 6115 | |
| 6116 | // True if proxy app permission mismatch between framework and GNSS HAL. |
| 6117 | optional bool is_permission_mismatched = 9; |
| 6118 | } |
| 6119 | |
| 6120 | /** |
| 6121 | * Logs GNSS configuration as defined in IGnssConfiguration.hal. |
| 6122 | * |
| 6123 | * Logged from: |
| 6124 | * frameworks/base/services/core/java/com/android/server/location/GnssConfiguration.java |
| 6125 | */ |
| 6126 | message GnssConfigurationReported { |
| 6127 | // SUPL host name. |
| 6128 | optional string supl_host = 1; |
| 6129 | |
| 6130 | // SUPL port number. |
| 6131 | optional int32 supl_port = 2; |
| 6132 | |
| 6133 | // C2K host name. |
| 6134 | optional string c2k_host = 3; |
| 6135 | |
| 6136 | // C2K port number. |
| 6137 | optional int32 c2k_port = 4; |
| 6138 | |
| 6139 | // The SUPL version requested by Carrier. |
| 6140 | optional int32 supl_ver = 5; |
| 6141 | |
| 6142 | // The SUPL mode. |
| 6143 | optional android.server.location.SuplMode supl_mode = 6; |
| 6144 | |
| 6145 | // True if NI emergency SUPL restrictions is enabled. |
| 6146 | optional bool supl_es = 7; |
| 6147 | |
| 6148 | // LTE Positioning Profile settings |
| 6149 | optional android.server.location.LppProfile lpp_profile = 8; |
| 6150 | |
| 6151 | // Positioning protocol on A-Glonass system. |
| 6152 | optional android.server.location.GlonassPosProtocol a_glonass_pos_protocol_select = 9; |
| 6153 | |
| 6154 | // True if emergency PDN is used. Otherwise, regular PDN is used. |
| 6155 | optional bool use_emergency_pdn_for_emergency_supl= 10; |
| 6156 | |
| 6157 | // Configurations of how GPS functionalities should be locked when user turns off GPS On setting. |
| 6158 | optional android.server.location.GpsLock gps_lock = 11; |
| 6159 | |
| 6160 | // Number of seconds to extend the emergency session duration post emergency call. |
| 6161 | optional int32 es_extension_sec = 12; |
| 6162 | |
| 6163 | // The full list of package names of proxy Android applications representing the non-framework |
| 6164 | // location access entities (on/off the device) for which the framework user has granted |
| 6165 | // non-framework location access permission. The package names are concatenated in one string |
| 6166 | // with spaces as separators. |
| 6167 | optional string enabled_proxy_app_package_name_list = 13; |
Yu-Han Yang | 8a1b51d | 2018-12-26 22:18:31 -0800 | [diff] [blame] | 6168 | } |
Jack Yu | 95b64f3 | 2018-12-13 18:26:11 +0800 | [diff] [blame] | 6169 | |
| 6170 | /** |
| 6171 | * Logs when a NFC device's error occurred. |
| 6172 | * Logged from: |
| 6173 | * system/nfc/src/nfc/nfc/nfc_ncif.cc |
| 6174 | * packages/apps/Nfc/src/com/android/nfc/cardemulation/AidRoutingManager.java |
| 6175 | */ |
| 6176 | message NfcErrorOccurred { |
Alex Salo | d7c3eef | 2019-01-25 14:43:27 -0800 | [diff] [blame] | 6177 | enum Type { |
| 6178 | UNKNOWN = 0; |
| 6179 | CMD_TIMEOUT = 1; |
| 6180 | ERROR_NOTIFICATION = 2; |
| 6181 | AID_OVERFLOW = 3; |
| 6182 | } |
| 6183 | optional Type type = 1; |
| 6184 | // If it's nci cmd timeout, log the timeout command. |
| 6185 | optional uint32 nci_cmd = 2; |
Jack Yu | 95b64f3 | 2018-12-13 18:26:11 +0800 | [diff] [blame] | 6186 | |
Alex Salo | d7c3eef | 2019-01-25 14:43:27 -0800 | [diff] [blame] | 6187 | optional uint32 error_ntf_status_code = 3; |
Jack Yu | 95b64f3 | 2018-12-13 18:26:11 +0800 | [diff] [blame] | 6188 | } |
| 6189 | |
| 6190 | /** |
| 6191 | * Logs when a NFC device's state changed event |
| 6192 | * Logged from: |
| 6193 | * packages/apps/Nfc/src/com/android/nfc/NfcService.java |
| 6194 | */ |
| 6195 | message NfcStateChanged { |
Alex Salo | d7c3eef | 2019-01-25 14:43:27 -0800 | [diff] [blame] | 6196 | enum State { |
| 6197 | UNKNOWN = 0; |
| 6198 | OFF = 1; |
| 6199 | ON = 2; |
| 6200 | ON_LOCKED = 3; // Secure Nfc enabled. |
| 6201 | CRASH_RESTART = 4; // NfcService watchdog timeout restart. |
| 6202 | } |
| 6203 | optional State state = 1; |
Jack Yu | 95b64f3 | 2018-12-13 18:26:11 +0800 | [diff] [blame] | 6204 | } |
| 6205 | |
| 6206 | /** |
| 6207 | * Logs when a NFC Beam Transaction occurred. |
| 6208 | * Logged from: |
| 6209 | * packages/apps/Nfc/src/com/android/nfc/P2pLinkManager.java |
| 6210 | */ |
| 6211 | message NfcBeamOccurred { |
Alex Salo | d7c3eef | 2019-01-25 14:43:27 -0800 | [diff] [blame] | 6212 | enum Operation { |
| 6213 | UNKNOWN = 0; |
| 6214 | SEND = 1; |
| 6215 | RECEIVE = 2; |
| 6216 | } |
| 6217 | optional Operation operation = 1; |
Jack Yu | 95b64f3 | 2018-12-13 18:26:11 +0800 | [diff] [blame] | 6218 | } |
| 6219 | |
| 6220 | /** |
| 6221 | * Logs when a NFC Card Emulation Transaction occurred. |
| 6222 | * Logged from: |
| 6223 | * packages/apps/Nfc/src/com/android/nfc/cardemulation/HostEmulationManager.java |
| 6224 | * packages/apps/Nfc/src/com/android/nfc/cardemulation/HostNfcFEmulationManager.java |
| 6225 | */ |
| 6226 | message NfcCardemulationOccurred { |
Alex Salo | d7c3eef | 2019-01-25 14:43:27 -0800 | [diff] [blame] | 6227 | enum Category { |
| 6228 | UNKNOWN = 0; |
| 6229 | HCE_PAYMENT = 1; |
| 6230 | HCE_OTHER = 2; |
| 6231 | OFFHOST = 3; |
| 6232 | } |
| 6233 | // Transaction belongs to HCE payment or HCE other category, or offhost. |
| 6234 | optional Category category = 1; |
| 6235 | // SeName from transaction: SIMx, eSEx, HCE, HCEF. |
| 6236 | optional string se_name = 2; |
Jack Yu | 95b64f3 | 2018-12-13 18:26:11 +0800 | [diff] [blame] | 6237 | } |
| 6238 | |
| 6239 | /** |
| 6240 | * Logs when a NFC Tag event occurred. |
| 6241 | * Logged from: |
| 6242 | * packages/apps/Nfc/src/com/android/nfc/NfcDispatcher.java |
| 6243 | */ |
| 6244 | message NfcTagOccurred { |
Alex Salo | d7c3eef | 2019-01-25 14:43:27 -0800 | [diff] [blame] | 6245 | enum Type { |
| 6246 | UNKNOWN = 0; |
| 6247 | URL = 1; |
| 6248 | BT_PAIRING = 2; |
| 6249 | PROVISION = 3; |
| 6250 | WIFI_CONNECT = 4; |
| 6251 | APP_LAUNCH = 5; |
| 6252 | OTHERS = 6; |
| 6253 | } |
| 6254 | optional Type type = 1; |
Jack Yu | 95b64f3 | 2018-12-13 18:26:11 +0800 | [diff] [blame] | 6255 | } |
| 6256 | |
| 6257 | /** |
| 6258 | * Logs when Hce transaction triggered |
| 6259 | * Logged from: |
| 6260 | * system/nfc/src/nfc/nfc/nfc_ncif.cc |
| 6261 | */ |
| 6262 | message NfcHceTransactionOccurred { |
| 6263 | // The latency period(in microseconds) it took for the first HCE data |
| 6264 | // exchange. |
| 6265 | optional uint32 latency_micros = 1; |
| 6266 | } |
| 6267 | |
| 6268 | /** |
| 6269 | * Logs when SecureElement state event changed |
| 6270 | * Logged from: |
| 6271 | * packages/apps/SecureElement/src/com/android/se/Terminal.java |
| 6272 | */ |
| 6273 | message SeStateChanged { |
Alex Salo | d7c3eef | 2019-01-25 14:43:27 -0800 | [diff] [blame] | 6274 | enum State { |
| 6275 | UNKNOWN = 0; |
| 6276 | INITIALIZED = 1; |
| 6277 | DISCONNECTED = 2; |
| 6278 | CONNECTED = 3; |
| 6279 | HALCRASH = 4; |
| 6280 | } |
| 6281 | optional State state = 1; |
Jack Yu | 95b64f3 | 2018-12-13 18:26:11 +0800 | [diff] [blame] | 6282 | |
Alex Salo | d7c3eef | 2019-01-25 14:43:27 -0800 | [diff] [blame] | 6283 | optional string state_change_reason = 2; |
| 6284 | // SIMx or eSEx. |
| 6285 | optional string terminal = 3; |
Jack Yu | 95b64f3 | 2018-12-13 18:26:11 +0800 | [diff] [blame] | 6286 | } |
| 6287 | |
| 6288 | /** |
Philip P. Moltmann | e0cf4e6 | 2019-01-29 14:22:48 -0800 | [diff] [blame] | 6289 | * Information about a permission grant request |
| 6290 | */ |
| 6291 | message PermissionGrantRequestResultReported { |
| 6292 | // unique value identifying an API call. A API call might result in multiple of these atoms |
| 6293 | optional int64 request_id = 1; |
| 6294 | |
| 6295 | // UID of package requesting the permission grant |
Stanislav Zholnin | e8d073b | 2019-11-25 17:49:21 +0000 | [diff] [blame] | 6296 | optional int32 uid = 2 [(is_uid) = true]; |
Philip P. Moltmann | e0cf4e6 | 2019-01-29 14:22:48 -0800 | [diff] [blame] | 6297 | |
| 6298 | // Name of package requesting the permission grant |
Stanislav Zholnin | e8d073b | 2019-11-25 17:49:21 +0000 | [diff] [blame] | 6299 | optional string package_name = 3; |
Philip P. Moltmann | e0cf4e6 | 2019-01-29 14:22:48 -0800 | [diff] [blame] | 6300 | |
| 6301 | // The permission to be granted |
| 6302 | optional string permission_name = 4; |
| 6303 | |
| 6304 | // If the permission was explicitly requested via the API or added by the system |
| 6305 | optional bool is_implicit = 5; |
| 6306 | |
| 6307 | enum Result { |
| 6308 | UNDEFINED = 0; |
| 6309 | // permission request was ignored |
| 6310 | IGNORED = 1; |
| 6311 | // permission request was ignored because it was user fixed |
| 6312 | IGNORED_USER_FIXED = 2; |
| 6313 | // permission request was ignored because it was policy fixed |
| 6314 | IGNORED_POLICY_FIXED = 3; |
| 6315 | // permission was granted by user action |
| 6316 | USER_GRANTED = 4; |
| 6317 | // permission was automatically granted |
| 6318 | AUTO_GRANTED = 5; |
| 6319 | // permission was denied by user action |
| 6320 | USER_DENIED = 6; |
| 6321 | // permission was denied with prejudice by the user |
| 6322 | USER_DENIED_WITH_PREJUDICE = 7; |
| 6323 | // permission was automatically denied |
| 6324 | AUTO_DENIED = 8; |
Svet Ganov | d8eb8b2 | 2019-04-05 18:52:08 -0700 | [diff] [blame] | 6325 | // permission request was ignored because permission is restricted |
| 6326 | IGNORED_RESTRICTED_PERMISSION = 9; |
Stanislav Zholnin | 066aefb | 2019-10-17 18:40:33 +0100 | [diff] [blame] | 6327 | // one time permission was granted by user action |
| 6328 | USER_GRANTED_ONE_TIME = 10; |
Stanislav Zholnin | 8fde4fb | 2019-12-06 19:06:08 +0000 | [diff] [blame] | 6329 | // user ignored request by leaving the request screen without choosing any option |
| 6330 | USER_IGNORED = 11; |
Evan Severson | 7c1cc8a | 2019-12-17 14:36:17 -0800 | [diff] [blame] | 6331 | // user granted the permission after being linked to settings |
| 6332 | USER_GRANTED_IN_SETTINGS = 12; |
| 6333 | // user denied the permission after being linked to settings |
| 6334 | USER_DENIED_IN_SETTINGS = 13; |
| 6335 | // user denied the permission with prejudice after being linked to settings |
| 6336 | USER_DENIED_WITH_PREJUDICE_IN_SETTINGS = 14; |
| 6337 | // permission was automatically revoked after one-time permission expired |
| 6338 | AUTO_ONE_TIME_PERMISSION_REVOKED = 15; |
Eugene Susla | 6db4be5 | 2020-01-09 11:02:09 -0800 | [diff] [blame^] | 6339 | // permission was automatically revoked for unused app |
| 6340 | AUTO_UNUSED_APP_PERMISSION_REVOKED = 16; |
Philip P. Moltmann | e0cf4e6 | 2019-01-29 14:22:48 -0800 | [diff] [blame] | 6341 | } |
| 6342 | // The result of the permission grant |
| 6343 | optional Result result = 6; |
| 6344 | } |
| 6345 | |
| 6346 | /** |
Jack Yu | 95b64f3 | 2018-12-13 18:26:11 +0800 | [diff] [blame] | 6347 | * Logs when Omapi API used |
| 6348 | * Logged from: |
| 6349 | * packages/apps/SecureElement/src/com/android/se/Terminal.java |
| 6350 | */ |
| 6351 | message SeOmapiReported { |
Alex Salo | d7c3eef | 2019-01-25 14:43:27 -0800 | [diff] [blame] | 6352 | enum Operation { |
| 6353 | UNKNOWN = 0; |
| 6354 | OPEN_CHANNEL = 1; |
| 6355 | } |
| 6356 | optional Operation operation = 1; |
| 6357 | // SIMx or eSEx. |
| 6358 | optional string terminal = 2; |
Jack Yu | 95b64f3 | 2018-12-13 18:26:11 +0800 | [diff] [blame] | 6359 | |
Alex Salo | d7c3eef | 2019-01-25 14:43:27 -0800 | [diff] [blame] | 6360 | optional string package_name = 3; |
Jack Yu | 95b64f3 | 2018-12-13 18:26:11 +0800 | [diff] [blame] | 6361 | } |
Ng Zhi An | 7ff7fdb | 2019-01-16 15:35:51 -0800 | [diff] [blame] | 6362 | |
| 6363 | /** |
Alex Salo | a060aee | 2019-01-21 14:36:41 -0800 | [diff] [blame] | 6364 | * Logs the dispatch latency of a broadcast during processing of BOOT_COMPLETED. |
| 6365 | * The dispatch latency is the dispatchClockTime - enqueueClockTime. |
Ng Zhi An | 7ff7fdb | 2019-01-16 15:35:51 -0800 | [diff] [blame] | 6366 | * Logged from: |
| 6367 | * frameworks/base/services/core/java/com/android/server/am/BroadcastQueue.java |
| 6368 | */ |
| 6369 | message BroadcastDispatchLatencyReported { |
Alex Salo | a060aee | 2019-01-21 14:36:41 -0800 | [diff] [blame] | 6370 | optional int64 dispatch_latency_millis = 1; |
| 6371 | } |
| 6372 | |
| 6373 | /** |
| 6374 | * Logs AttentionManagerService attention check result. |
| 6375 | * |
| 6376 | * Logged from: |
| 6377 | * frameworks/base/services/core/java/com/android/server/attention/AttentionManagerService.java |
| 6378 | */ |
| 6379 | message AttentionManagerServiceResultReported { |
| 6380 | // See core/java/android/service/attention/AttentionService.java |
| 6381 | enum AttentionCheckResult { |
| 6382 | UNKNOWN = 20; |
| 6383 | ATTENTION_SUCCESS_ABSENT = 0; |
| 6384 | ATTENTION_SUCCESS_PRESENT = 1; |
Alex Salo | dd028ba | 2019-04-17 13:33:49 -0700 | [diff] [blame] | 6385 | ATTENTION_FAILURE_UNKNOWN = 2; |
| 6386 | ATTENTION_FAILURE_CANCELLED = 3; |
| 6387 | ATTENTION_FAILURE_PREEMPTED = 4; |
| 6388 | ATTENTION_FAILURE_TIMED_OUT = 5; |
| 6389 | ATTENTION_FAILURE_CAMERA_PERMISSION_ABSENT = 6; |
Alex Salo | a060aee | 2019-01-21 14:36:41 -0800 | [diff] [blame] | 6390 | } |
| 6391 | optional AttentionCheckResult attention_check_result = 1 [default = UNKNOWN]; |
Ng Zhi An | 7ff7fdb | 2019-01-16 15:35:51 -0800 | [diff] [blame] | 6392 | } |
Michael Groover | 9e7b06e | 2018-12-28 19:55:51 -0800 | [diff] [blame] | 6393 | |
| 6394 | /** |
| 6395 | * Logs when an adb connection changes state. |
| 6396 | * |
| 6397 | * Logged from: |
| 6398 | * frameworks/base/services/core/java/com/android/server/adb/AdbDebuggingManager.java |
| 6399 | */ |
| 6400 | message AdbConnectionChanged { |
| 6401 | // The last time this system connected via adb, or 0 if the 'always allow' option was not |
| 6402 | // previously selected for this system. |
| 6403 | optional int64 last_connection_time_millis = 1; |
| 6404 | |
| 6405 | // The time in ms within which a subsequent connection from an 'always allow' system is allowed |
| 6406 | // to reconnect via adb without user interaction. |
| 6407 | optional int64 auth_window_millis = 2; |
| 6408 | |
| 6409 | // The state of the adb connection from frameworks/base/core/proto/android/debug/enums.proto. |
| 6410 | optional android.debug.AdbConnectionStateEnum state = 3; |
| 6411 | |
| 6412 | // True if the 'always allow' option was selected for this system. |
| 6413 | optional bool always_allow = 4; |
| 6414 | } |
Carter Hsu | b8fd1e9 | 2019-01-11 15:24:45 +0800 | [diff] [blame] | 6415 | |
| 6416 | /* |
| 6417 | * Logs the reported speech DSP status. |
| 6418 | * |
| 6419 | * Logged from: |
| 6420 | * Vendor audio implementation. |
| 6421 | */ |
| 6422 | message SpeechDspStatReported { |
| 6423 | // The total Speech DSP uptime in milliseconds. |
| 6424 | optional int32 total_uptime_millis = 1; |
| 6425 | // The total Speech DSP downtime in milliseconds. |
| 6426 | optional int32 total_downtime_millis = 2; |
| 6427 | optional int32 total_crash_count = 3; |
| 6428 | optional int32 total_recover_count = 4; |
| 6429 | } |
Badhri Jagan Sridharan | 129c729 | 2019-01-14 21:18:25 -0800 | [diff] [blame] | 6430 | |
| 6431 | /** |
| 6432 | * Logs USB connector contaminant status. |
| 6433 | * |
| 6434 | * Logged from: USB Service. |
| 6435 | */ |
| 6436 | message UsbContaminantReported { |
| 6437 | optional string id = 1; |
| 6438 | optional android.service.usb.ContaminantPresenceStatus status = 2; |
| 6439 | } |
Olivier Gaillard | 18d45220 | 2019-01-22 15:03:41 +0000 | [diff] [blame] | 6440 | |
| 6441 | /** |
| 6442 | * This atom is for debugging purpose. |
| 6443 | */ |
| 6444 | message DebugElapsedClock { |
| 6445 | // Monotically increasing value for each pull. |
| 6446 | optional int64 pull_count = 1; |
| 6447 | // Time from System.elapsedRealtime. |
| 6448 | optional int64 elapsed_clock_millis = 2; |
| 6449 | // Time from System.elapsedRealtime. |
| 6450 | optional int64 same_elapsed_clock_millis = 3; |
| 6451 | // Diff between current elapsed time and elapsed time from previous pull. |
| 6452 | optional int64 elapsed_clock_diff_millis = 4; |
| 6453 | |
| 6454 | enum Type { |
| 6455 | TYPE_UNKNOWN = 0; |
| 6456 | ALWAYS_PRESENT = 1; |
| 6457 | PRESENT_ON_ODD_PULLS = 2; |
| 6458 | } |
| 6459 | // Type of behavior for the pulled data. |
| 6460 | optional Type type = 5; |
| 6461 | } |
| 6462 | |
| 6463 | /** |
| 6464 | * This atom is for debugging purpose. |
| 6465 | */ |
| 6466 | message DebugFailingElapsedClock { |
| 6467 | // Monotically increasing value for each pull. |
| 6468 | optional int64 pull_count = 1; |
| 6469 | // Time from System.elapsedRealtime. |
| 6470 | optional int64 elapsed_clock_millis = 2; |
| 6471 | // Time from System.elapsedRealtime. |
| 6472 | optional int64 same_elapsed_clock_millis = 3; |
| 6473 | // Diff between current elapsed time and elapsed time from previous pull. |
| 6474 | optional int64 elapsed_clock_diff_millis = 4; |
| 6475 | } |
Steven Wu | acef6bb | 2019-01-23 14:21:17 -0500 | [diff] [blame] | 6476 | |
| 6477 | /** Logs System UI bubbles event changed. |
| 6478 | * |
| 6479 | * Logged from: |
| 6480 | * frameworks/base/packages/SystemUI/src/com/android/systemui/bubbles |
| 6481 | */ |
| 6482 | message BubbleUIChanged { |
| 6483 | |
| 6484 | // The app package that is posting the bubble. |
| 6485 | optional string package_name = 1; |
| 6486 | |
| 6487 | // The notification channel that is posting the bubble. |
| 6488 | optional string notification_channel = 2; |
| 6489 | |
| 6490 | // The notification id associated with the posted bubble. |
| 6491 | optional int32 notification_id = 3; |
| 6492 | |
| 6493 | // The position of the bubble within the bubble stack. |
| 6494 | optional int32 position = 4; |
| 6495 | |
| 6496 | // The total number of bubbles within the bubble stack. |
| 6497 | optional int32 total_number = 5; |
| 6498 | |
| 6499 | // User interactions with the bubble. |
| 6500 | enum Action { |
| 6501 | UNKNOWN = 0; |
| 6502 | POSTED = 1; |
| 6503 | UPDATED = 2; |
| 6504 | EXPANDED = 3; |
| 6505 | COLLAPSED = 4; |
| 6506 | DISMISSED = 5; |
| 6507 | STACK_DISMISSED = 6; |
| 6508 | STACK_MOVED = 7; |
| 6509 | HEADER_GO_TO_APP = 8; |
| 6510 | HEADER_GO_TO_SETTINGS = 9; |
| 6511 | PERMISSION_OPT_IN = 10; |
| 6512 | PERMISSION_OPT_OUT = 11; |
Steven Wu | a62cb6a | 2019-02-15 17:12:51 -0500 | [diff] [blame] | 6513 | PERMISSION_DIALOG_SHOWN = 12; |
Steven Wu | acef6bb | 2019-01-23 14:21:17 -0500 | [diff] [blame] | 6514 | SWIPE_LEFT = 13; |
| 6515 | SWIPE_RIGHT = 14; |
Steven Wu | a254dab | 2019-01-29 11:30:39 -0500 | [diff] [blame] | 6516 | STACK_EXPANDED = 15; |
Steven Wu | 1684f2d | 2019-04-11 14:10:42 -0400 | [diff] [blame] | 6517 | FLYOUT = 16; |
Steven Wu | acef6bb | 2019-01-23 14:21:17 -0500 | [diff] [blame] | 6518 | } |
| 6519 | optional Action action = 6; |
| 6520 | |
| 6521 | // Normalized screen position of the bubble stack. The range is between 0 and 1. |
| 6522 | optional float normalized_x_position = 7; |
| 6523 | optional float normalized_y_position = 8; |
Steven Wu | 45e38ae | 2019-03-25 16:16:59 -0400 | [diff] [blame] | 6524 | |
| 6525 | // Whether the bubble is unread. If it is unread, a dot is shown in the bubble stack icon. |
| 6526 | optional bool is_unread = 9; |
Steven Wu | 8ba8ca9 | 2019-04-11 10:47:42 -0400 | [diff] [blame] | 6527 | |
| 6528 | // Whether the bubble is an on-going one. |
| 6529 | optional bool is_ongoing = 10; |
| 6530 | |
| 6531 | // Whether the bubble is produced by an app running in foreground. |
Mady Mellor | daa0a66 | 2019-06-24 16:42:35 -0700 | [diff] [blame] | 6532 | // This is deprecated and the value should be ignored. |
| 6533 | optional bool is_foreground = 11 [deprecated = true]; |
Steven Wu | acef6bb | 2019-01-23 14:21:17 -0500 | [diff] [blame] | 6534 | } |
Kweku Adams | 8845d01 | 2018-12-11 20:06:45 -0800 | [diff] [blame] | 6535 | |
| 6536 | /** |
Steven Wu | 552f63f | 2019-02-05 13:41:36 -0500 | [diff] [blame] | 6537 | * Logs System UI bubbles developer errors. |
| 6538 | * |
| 6539 | * Logged from: |
| 6540 | * frameworks/base/packages/SystemUI/src/com/android/systemui/bubbles/BubbleController.java |
| 6541 | */ |
| 6542 | message BubbleDeveloperErrorReported { |
| 6543 | |
| 6544 | // The app package that is posting the bubble. |
| 6545 | optional string package_name = 1; |
| 6546 | |
| 6547 | // Bubble developer error type enums. |
| 6548 | enum Error { |
| 6549 | UNKNOWN = 0; |
| 6550 | ACTIVITY_INFO_MISSING = 1; |
| 6551 | ACTIVITY_INFO_NOT_RESIZABLE = 2; |
| 6552 | DOCUMENT_LAUNCH_NOT_ALWAYS = 3; |
| 6553 | } |
| 6554 | optional Error error = 2 [default = UNKNOWN]; |
| 6555 | } |
| 6556 | |
| 6557 | /** |
Kweku Adams | 8845d01 | 2018-12-11 20:06:45 -0800 | [diff] [blame] | 6558 | * Logs that a constraint for a scheduled job has changed. |
| 6559 | * |
| 6560 | * Logged from: |
| 6561 | * frameworks/base/services/core/java/com/android/server/job/controllers/JobStatus.java |
| 6562 | */ |
| 6563 | message ScheduledJobConstraintChanged { |
| 6564 | repeated AttributionNode attribution_node = 1; |
| 6565 | |
| 6566 | // Name of the job. |
| 6567 | optional string job_name = 2; |
| 6568 | |
| 6569 | optional com.android.server.job.ConstraintEnum constraint = 3; |
| 6570 | |
| 6571 | enum State { |
Kweku Adams | e8db3ab | 2019-02-27 14:30:34 -0800 | [diff] [blame] | 6572 | UNKNOWN = 0; |
| 6573 | UNSATISFIED = 1; |
| 6574 | SATISFIED = 2; |
Kweku Adams | 8845d01 | 2018-12-11 20:06:45 -0800 | [diff] [blame] | 6575 | } |
| 6576 | optional State state = 4; |
| 6577 | } |
Alex Salo | d7c3eef | 2019-01-25 14:43:27 -0800 | [diff] [blame] | 6578 | |
| 6579 | /** |
| 6580 | * Logs PowerManagerService screen timeout resets (extensions) that happen when an attention check |
| 6581 | * returns true. |
| 6582 | * |
| 6583 | * Logged from: |
| 6584 | * frameworks/base/services/core/java/com/android/server/power/PowerManagerService.java |
| 6585 | */ |
| 6586 | message ScreenTimeoutExtensionReported { |
| 6587 | // Describes how many times in a row did the power manager reset the screen off timeout. |
| 6588 | optional uint32 consecutive_timeout_extended_count = 1; |
| 6589 | } |
Hui Yu | 885aca1 | 2019-01-10 17:11:34 -0800 | [diff] [blame] | 6590 | |
| 6591 | /* |
| 6592 | * Logs number of milliseconds it takes to start a process. |
| 6593 | * The definition of app process start time is from the app launch time to |
| 6594 | * the time that Zygote finished forking the app process and loaded the |
| 6595 | * application package's java classes. |
| 6596 | |
| 6597 | * This metric is different from AppStartOccurred which is for foreground |
| 6598 | * activity only. |
| 6599 | |
| 6600 | * ProcessStartTime can report all processes (both foreground and background) |
| 6601 | * start time. |
| 6602 | * |
| 6603 | * Logged from: |
| 6604 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
| 6605 | */ |
| 6606 | message ProcessStartTime { |
| 6607 | // The uid of the ProcessRecord. |
| 6608 | optional int32 uid = 1 [(is_uid) = true]; |
| 6609 | |
| 6610 | // The process pid. |
| 6611 | optional int32 pid = 2; |
| 6612 | |
| 6613 | // The process name. |
| 6614 | // Usually package name, "system" for system server. |
| 6615 | // Provided by ActivityManagerService. |
| 6616 | optional string process_name = 3; |
| 6617 | |
| 6618 | enum StartType { |
| 6619 | UNKNOWN = 0; |
| 6620 | WARM = 1; |
| 6621 | HOT = 2; |
| 6622 | COLD = 3; |
| 6623 | } |
| 6624 | |
| 6625 | // The start type. |
| 6626 | optional StartType type = 4; |
| 6627 | |
| 6628 | // The elapsed realtime at the start of the process. |
| 6629 | optional int64 process_start_time_millis = 5; |
| 6630 | |
| 6631 | // Number of milliseconds it takes to reach bind application. |
| 6632 | optional int32 bind_application_delay_millis = 6; |
| 6633 | |
| 6634 | // Number of milliseconds it takes to finish start of the process. |
| 6635 | optional int32 process_start_delay_millis = 7; |
| 6636 | |
| 6637 | // hostingType field in ProcessRecord, the component type such as "activity", |
| 6638 | // "service", "content provider", "broadcast" or other strings. |
| 6639 | optional string hosting_type = 8; |
| 6640 | |
| 6641 | // hostingNameStr field in ProcessRecord. The component class name that runs |
| 6642 | // in this process. |
| 6643 | optional string hosting_name = 9; |
| 6644 | } |
| 6645 | |
Philip P. Moltmann | f21a350 | 2019-01-30 09:53:04 -0800 | [diff] [blame] | 6646 | /** |
Ray Essick | 8ab04df | 2019-02-15 11:01:02 -0800 | [diff] [blame] | 6647 | * Track Media Codec usage |
| 6648 | * Logged from: |
| 6649 | * frameworks/av/media/libstagefright/MediaCodec.cpp |
| 6650 | * frameworks/av/services/mediaanalytics/statsd_codec.cpp |
| 6651 | */ |
| 6652 | message MediametricsCodecReported { |
| 6653 | optional int64 timestamp_nanos = 1; |
| 6654 | optional string package_name = 2; |
| 6655 | optional int64 package_version_code = 3; |
| 6656 | optional int64 media_apex_version = 4; |
| 6657 | |
| 6658 | optional android.stats.mediametrics.CodecData codec_data = 5 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 6659 | } |
| 6660 | |
| 6661 | /** |
| 6662 | * Track Media Extractor (pulling video/audio streams out of containers) usage |
| 6663 | * Logged from: |
| 6664 | * frameworks/av/media/libstagefright/RemoteMediaExtractor.cpp |
| 6665 | * frameworks/av/services/mediaanalytics/statsd_extractor.cpp |
| 6666 | */ |
| 6667 | message MediametricsExtractorReported { |
| 6668 | optional int64 timestamp_nanos = 1; |
| 6669 | optional string package_name = 2; |
| 6670 | optional int64 package_version_code = 3; |
| 6671 | optional int64 media_apex_version = 4; |
| 6672 | |
| 6673 | optional android.stats.mediametrics.ExtractorData extractor_data = 5 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 6674 | } |
| 6675 | |
| 6676 | /** |
| 6677 | * Track how we arbitrate between microphone/input requests. |
| 6678 | * Logged from |
| 6679 | * frameworks/av/services/audiopolicy/service/AudioPolicyInterfaceImpl.cpp |
| 6680 | * frameworks/av/services/mediaanalytics/statsd_audiopolicy.cpp |
| 6681 | */ |
| 6682 | message MediametricsAudiopolicyReported { |
| 6683 | optional int64 timestamp_nanos = 1; |
| 6684 | optional string package_name = 2; |
| 6685 | optional int64 package_version_code = 3; |
| 6686 | optional int64 media_apex_version = 4; |
| 6687 | |
| 6688 | optional android.stats.mediametrics.AudioPolicyData audiopolicy_data = 5 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 6689 | } |
| 6690 | |
| 6691 | /** |
| 6692 | * Track how we arbitrate between microphone requests. |
| 6693 | * Logged from |
| 6694 | * frameworks/av/media/libaudioclient/AudioRecord.cpp |
| 6695 | * frameworks/av/services/mediaanalytics/statsd_audiorecord.cpp |
| 6696 | */ |
| 6697 | message MediametricsAudiorecordReported { |
| 6698 | optional int64 timestamp_nanos = 1; |
| 6699 | optional string package_name = 2; |
| 6700 | optional int64 package_version_code = 3; |
| 6701 | optional int64 media_apex_version = 4; |
| 6702 | |
| 6703 | optional android.stats.mediametrics.AudioRecordData audiorecord_data = 5 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 6704 | } |
| 6705 | |
| 6706 | /** |
| 6707 | * Track how we arbitrate between microphone/input requests. |
| 6708 | * Logged from |
| 6709 | * frameworks/av/media/libnblog/ReportPerformance.cpp |
| 6710 | * frameworks/av/services/mediaanalytics/statsd_audiothread.cpp |
| 6711 | */ |
| 6712 | message MediametricsAudiothreadReported { |
| 6713 | optional int64 timestamp_nanos = 1; |
| 6714 | optional string package_name = 2; |
| 6715 | optional int64 package_version_code = 3; |
| 6716 | optional int64 media_apex_version = 4; |
| 6717 | |
| 6718 | optional android.stats.mediametrics.AudioThreadData audiothread_data = 5 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 6719 | } |
| 6720 | |
| 6721 | /** |
| 6722 | * Track how we arbitrate between microphone/input requests. |
| 6723 | * Logged from |
| 6724 | * frameworks/av/media/libaudioclient/AudioTrack.cpp |
| 6725 | * frameworks/av/services/mediaanalytics/statsd_audiotrack.cpp |
| 6726 | */ |
| 6727 | message MediametricsAudiotrackReported { |
| 6728 | optional int64 timestamp_nanos = 1; |
| 6729 | optional string package_name = 2; |
| 6730 | optional int64 package_version_code = 3; |
| 6731 | optional int64 media_apex_version = 4; |
| 6732 | |
| 6733 | optional android.stats.mediametrics.AudioTrackData audiotrack_data = 5 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 6734 | } |
| 6735 | |
| 6736 | /** |
| 6737 | * Track information about DRM framework performance |
| 6738 | * Logged from |
| 6739 | * frameworks/av/drm/libmediadrm/DrmHal.cpp |
| 6740 | * frameworks/av/services/mediaanalytics/statsd_drm.cpp |
| 6741 | */ |
| 6742 | message MediametricsMediadrmReported { |
| 6743 | optional int64 timestamp_nanos = 1; |
| 6744 | optional string package_name = 2; |
| 6745 | optional int64 package_version_code = 3; |
| 6746 | optional int64 media_apex_version = 4; |
| 6747 | |
| 6748 | // vendor+description tell about which DRM plugin is in use on this device |
| 6749 | optional string vendor = 5; |
| 6750 | optional string description = 6; |
| 6751 | // from frameworks/av/drm/libmediadrm/protos/metrics.proto |
| 6752 | optional bytes framework_stats = 7 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 6753 | } |
| 6754 | |
| 6755 | /** |
| 6756 | * Track information about the widevine DRM plugin performance |
| 6757 | * Logged from |
| 6758 | * vendor/widevine/libwvdrmengine/cdm/metrics |
| 6759 | * frameworks/av/services/mediaanalytics/statsd_drm.cpp |
| 6760 | */ |
| 6761 | message MediametricsDrmWidevineReported { |
| 6762 | optional int64 timestamp_nanos = 1; |
| 6763 | optional string package_name = 2; |
| 6764 | optional int64 package_version_code = 3; |
| 6765 | optional int64 media_apex_version = 4; |
| 6766 | |
| 6767 | optional bytes vendor_specific_stats = 5 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 6768 | } |
| 6769 | |
| 6770 | /** |
| 6771 | * Track information about recordings (e.g. camcorder) |
| 6772 | * Logged from |
| 6773 | * frameworks/av/media/libmediaplayerservice/StagefrightRecorder.cpp |
| 6774 | * frameworks/av/services/mediaanalytics/statsd_recorder.cpp |
| 6775 | */ |
| 6776 | message MediametricsRecorderReported { |
| 6777 | optional int64 timestamp_nanos = 1; |
| 6778 | optional string package_name = 2; |
| 6779 | optional int64 package_version_code = 3; |
| 6780 | optional int64 media_apex_version = 4; |
| 6781 | |
| 6782 | optional android.stats.mediametrics.RecorderData recorder_data = 5 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 6783 | } |
| 6784 | |
| 6785 | /** |
| 6786 | * Track Media Player usage |
| 6787 | * Logged from: |
| 6788 | * frameworks/av/media/libmediaplayerservice/nuplayer/NuPlayerDriver.cpp |
| 6789 | * frameworks/av/services/mediaanalytics/statsd_nuplayer.cpp |
| 6790 | */ |
| 6791 | message MediametricsNuPlayerReported { |
| 6792 | optional int64 timestamp_nanos = 1; |
| 6793 | optional string package_name = 2; |
| 6794 | optional int64 package_version_code = 3; |
| 6795 | optional int64 media_apex_version = 4; |
| 6796 | |
| 6797 | optional android.stats.mediametrics.NuPlayerData nuplayer_data = 5 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 6798 | } |
| 6799 | |
| 6800 | /** |
Robert Shih | a4beed3 | 2019-08-19 14:15:23 -0700 | [diff] [blame] | 6801 | * Track Legacy DRM usage |
| 6802 | * Logged from |
| 6803 | * frameworks/av/drm/drmserver/DrmManager.cpp |
| 6804 | */ |
| 6805 | message MediametricsDrmManagerReported { |
| 6806 | optional int64 timestamp_nanos = 1; |
| 6807 | optional string package_name = 2; |
| 6808 | optional int64 package_version_code = 3; |
| 6809 | optional int64 media_apex_version = 4; |
| 6810 | |
| 6811 | enum Method { |
| 6812 | METHOD_NOT_FOUND = -1; |
| 6813 | GET_CONSTRAINTS = 0; |
| 6814 | GET_METADATA = 1; |
| 6815 | CAN_HANDLE = 2; |
| 6816 | PROCESS_DRM_INFO = 3; |
| 6817 | ACQUIRE_DRM_INFO = 4; |
| 6818 | SAVE_RIGHTS = 5; |
| 6819 | GET_ORIGINAL_MIME_TYPE = 6; |
| 6820 | GET_DRM_OBJECT_TYPE = 7; |
| 6821 | CHECK_RIGHTS_STATUS = 8; |
| 6822 | REMOVE_RIGHTS = 9; |
| 6823 | REMOVE_ALL_RIGHTS = 10; |
| 6824 | OPEN_CONVERT_SESSION = 11; |
| 6825 | OPEN_DECRYPT_SESSION = 12; |
| 6826 | } |
| 6827 | |
| 6828 | // plugin_id+description inform which Legacy DRM plugins are still in use on device |
| 6829 | optional string plugin_id = 5; |
| 6830 | optional string description = 6; |
| 6831 | optional Method method = 7; |
| 6832 | optional string mime_types = 8; |
| 6833 | } |
| 6834 | |
| 6835 | /** |
Philip P. Moltmann | f21a350 | 2019-01-30 09:53:04 -0800 | [diff] [blame] | 6836 | * State of a dangerous permission requested by a package |
Stanislav Zholnin | ccb82e4 | 2019-11-29 18:59:49 +0000 | [diff] [blame] | 6837 | * Pulled from: StatsCompanionService |
| 6838 | */ |
Philip P. Moltmann | f21a350 | 2019-01-30 09:53:04 -0800 | [diff] [blame] | 6839 | message DangerousPermissionState { |
| 6840 | // Name of the permission |
| 6841 | optional string permission_name = 1; |
| 6842 | |
| 6843 | // Uid of the package |
| 6844 | optional int32 uid = 2 [(is_uid) = true]; |
| 6845 | |
| 6846 | // Package requesting the permission |
| 6847 | optional string package_name = 3; |
| 6848 | |
| 6849 | // If the permission is granted to the uid |
| 6850 | optional bool is_granted = 4; |
Stanislav Zholnin | 75c3fd1 | 2019-05-21 13:10:51 +0100 | [diff] [blame] | 6851 | |
| 6852 | // Permission flags as per android.content.pm.PermissionFlags |
| 6853 | optional int32 permission_flags = 5; |
Philip P. Moltmann | f21a350 | 2019-01-30 09:53:04 -0800 | [diff] [blame] | 6854 | } |
| 6855 | |
Michael Groover | 4a0ca94 | 2019-01-24 17:41:25 -0800 | [diff] [blame] | 6856 | /** |
| 6857 | * Logs when a package is denied access to a device identifier based on the new access requirements. |
| 6858 | * |
| 6859 | * Logged from: |
| 6860 | * frameworks/base/telephony/java/com/android/internal/telephony/TelephonyPermissions.java |
| 6861 | */ |
| 6862 | message DeviceIdentifierAccessDenied { |
| 6863 | // The name of the package denied access to the requested device identifier. |
| 6864 | optional string package_name = 1; |
| 6865 | |
| 6866 | // The name of the device identifier method the package attempted to invoke. |
| 6867 | optional string method_name = 2; |
| 6868 | |
| 6869 | // True if the package is preinstalled. |
| 6870 | optional bool is_preinstalled = 3; |
| 6871 | |
| 6872 | // True if the package is privileged. |
Sooraj Sasindran | 22b53f4 | 2019-11-27 15:57:33 -0800 | [diff] [blame] | 6873 | // Starting from Android 11, this boolean is not set and will always be false. |
| 6874 | optional bool is_priv_app = 4 [deprecated = true]; |
Michael Groover | 4a0ca94 | 2019-01-24 17:41:25 -0800 | [diff] [blame] | 6875 | } |
Chenjie Yu | e13f44a | 2019-02-07 17:51:38 -0800 | [diff] [blame] | 6876 | |
| 6877 | /** |
Chenjie Yu | e13f44a | 2019-02-07 17:51:38 -0800 | [diff] [blame] | 6878 | * Pulls the ongoing mainline install train version code. |
| 6879 | * Pulled from StatsCompanionService |
| 6880 | */ |
| 6881 | message TrainInfo { |
| 6882 | optional int64 train_version_code = 1; |
| 6883 | |
| 6884 | optional TrainExperimentIds train_experiment_id = 2; |
Muhammad Qureshi | f4ca824 | 2019-03-01 09:20:15 -0800 | [diff] [blame] | 6885 | |
| 6886 | optional string train_name = 3; |
| 6887 | |
| 6888 | enum Status { |
| 6889 | UNKNOWN = 0; |
| 6890 | INSTALL_REQUESTED = 1; |
| 6891 | INSTALL_STARTED = 2; |
| 6892 | INSTALL_STAGED_NOT_READY = 3; |
| 6893 | INSTALL_STAGED_READY = 4; |
| 6894 | INSTALL_SUCCESS = 5; |
Tej Singh | 403fe47 | 2019-04-30 12:54:21 -0700 | [diff] [blame] | 6895 | // Replaced by INSTALL_FAILURE_DOWNLOAD, INSTALL_FAILURE_STATE_MISMATCH, |
| 6896 | // and INSTALL_FAILURE_COMMIT. |
| 6897 | INSTALL_FAILURE = 6 [deprecated = true]; |
| 6898 | // 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] | 6899 | INSTALL_CANCELLED = 7; |
| 6900 | INSTALLER_ROLLBACK_REQUESTED = 8; |
| 6901 | INSTALLER_ROLLBACK_INITIATED = 9; |
| 6902 | INSTALLER_ROLLBACK_INITIATED_FAILURE = 10; |
| 6903 | INSTALLER_ROLLBACK_STAGED = 11; |
| 6904 | INSTALLER_ROLLBACK_STAGED_FAILURE = 12; |
| 6905 | INSTALLER_ROLLBACK_BOOT_TRIGGERED = 13; |
| 6906 | INSTALLER_ROLLBACK_BOOT_TRIGGERED_FAILURE = 14; |
| 6907 | INSTALLER_ROLLBACK_SUCCESS = 15; |
| 6908 | INSTALLER_ROLLBACK_FAILURE = 16; |
Howard Ro | 174ed56 | 2019-04-07 22:17:58 -0700 | [diff] [blame] | 6909 | INSTALLER_ROLLBACK_STAGED_CANCEL_REQUESTED = 17; |
| 6910 | INSTALLER_ROLLBACK_STAGED_CANCEL_SUCCESS = 18; |
| 6911 | INSTALLER_ROLLBACK_STAGED_CANCEL_FAILURE = 19; |
| 6912 | INSTALL_STAGED_CANCEL_REQUESTED = 20; |
| 6913 | INSTALL_STAGED_CANCEL_SUCCESS = 21; |
| 6914 | INSTALL_STAGED_CANCEL_FAILURE = 22; |
Tej Singh | 403fe47 | 2019-04-30 12:54:21 -0700 | [diff] [blame] | 6915 | INSTALL_FAILURE_DOWNLOAD = 23; |
| 6916 | INSTALL_FAILURE_STATE_MISMATCH = 24; |
| 6917 | INSTALL_FAILURE_COMMIT = 25; |
Jonathan Nguyen | 5886a71 | 2020-01-16 10:34:21 -0800 | [diff] [blame] | 6918 | REBOOT_TRIGGERED = 26; |
Muhammad Qureshi | f4ca824 | 2019-03-01 09:20:15 -0800 | [diff] [blame] | 6919 | } |
| 6920 | optional Status status = 4; |
Chenjie Yu | e13f44a | 2019-02-07 17:51:38 -0800 | [diff] [blame] | 6921 | } |
joshmccloskey | 8c3322e | 2019-01-09 18:25:57 -0800 | [diff] [blame] | 6922 | |
| 6923 | /** |
| 6924 | * Logs the gesture stage changed event. |
| 6925 | * |
| 6926 | * Logged from: |
| 6927 | * frameworks/base/packages/SystemUI/ |
| 6928 | */ |
| 6929 | message AssistGestureStageReported { |
joshmccloskey | 99f3901 | 2019-02-20 14:45:08 -0800 | [diff] [blame] | 6930 | optional android.hardware.sensor.assist.AssistGestureStageEnum gesture_stage = 1; |
joshmccloskey | 8c3322e | 2019-01-09 18:25:57 -0800 | [diff] [blame] | 6931 | } |
| 6932 | |
| 6933 | /** |
| 6934 | * Logs the feedback type. |
| 6935 | * |
| 6936 | * Logged from: |
| 6937 | * frameworks/base/packages/SystemUI/ |
| 6938 | */ |
| 6939 | message AssistGestureFeedbackReported { |
joshmccloskey | 99f3901 | 2019-02-20 14:45:08 -0800 | [diff] [blame] | 6940 | // Whether or not the gesture was used. |
| 6941 | optional android.hardware.sensor.assist.AssistGestureFeedbackEnum feedback_type = 1; |
joshmccloskey | 8c3322e | 2019-01-09 18:25:57 -0800 | [diff] [blame] | 6942 | } |
| 6943 | |
| 6944 | /** |
| 6945 | * Logs the progress. |
| 6946 | * |
| 6947 | * Logged from: |
| 6948 | * frameworks/base/packages/SystemUI/ |
| 6949 | */ |
| 6950 | message AssistGestureProgressReported { |
joshmccloskey | 99f3901 | 2019-02-20 14:45:08 -0800 | [diff] [blame] | 6951 | // [0,100] progress for the assist gesture. |
| 6952 | optional int32 progress = 1; |
joshmccloskey | 8c3322e | 2019-01-09 18:25:57 -0800 | [diff] [blame] | 6953 | } |
Neil Fuller | db14b48 | 2019-02-05 19:44:44 +0000 | [diff] [blame] | 6954 | |
| 6955 | /* |
| 6956 | * Information about the time zone data on a device. |
| 6957 | */ |
| 6958 | message TimeZoneDataInfo { |
| 6959 | // A version identifier for the data set on device. e.g. "2018i" |
| 6960 | optional string tzdb_version = 1; |
| 6961 | } |
Yiwei Zhang | 5c81b63 | 2019-03-01 15:39:46 -0800 | [diff] [blame] | 6962 | |
Yiwei Zhang | 4fb9289 | 2019-03-04 14:29:25 -0800 | [diff] [blame] | 6963 | /** |
Yiwei Zhang | 5c81b63 | 2019-03-01 15:39:46 -0800 | [diff] [blame] | 6964 | * Logs the GPU stats global health information. |
| 6965 | * |
| 6966 | * Logged from: |
| 6967 | * frameworks/native/services/gpuservice/gpustats/ |
| 6968 | */ |
| 6969 | message GpuStatsGlobalInfo { |
| 6970 | // Package name of the gpu driver. |
| 6971 | optional string driver_package_name = 1; |
| 6972 | |
| 6973 | // Version name of the gpu driver. |
| 6974 | optional string driver_version_name = 2; |
| 6975 | |
| 6976 | // Version code of the gpu driver. |
| 6977 | optional int64 driver_version_code = 3; |
| 6978 | |
| 6979 | // Build time of the gpu driver in UTC as seconds since January 1, 1970. |
| 6980 | optional int64 driver_build_time = 4; |
| 6981 | |
| 6982 | // Total count of the gl driver gets loaded. |
| 6983 | optional int64 gl_loading_count = 5; |
| 6984 | |
| 6985 | // Total count of the gl driver fails to be loaded. |
| 6986 | optional int64 gl_loading_failure_count = 6; |
| 6987 | |
| 6988 | // Total count of the Vulkan driver gets loaded. |
| 6989 | optional int64 vk_loading_count = 7; |
| 6990 | |
| 6991 | // Total count of the Vulkan driver fails to be loaded. |
| 6992 | optional int64 vk_loading_failure_count = 8; |
Yiwei Zhang | 63852d2a | 2019-05-06 19:31:20 -0700 | [diff] [blame] | 6993 | |
| 6994 | // Api version of the system Vulkan driver. |
| 6995 | optional int32 vulkan_version = 9; |
| 6996 | |
| 6997 | // Api version of the system CPU Vulkan driver. |
| 6998 | optional int32 cpu_vulkan_version = 10; |
| 6999 | |
| 7000 | // Api version of the system GLES driver. |
| 7001 | optional int32 gles_version = 11; |
Yiwei Zhang | a0f5fef | 2019-05-08 16:30:47 -0700 | [diff] [blame] | 7002 | |
| 7003 | // Total count of the angle driver gets loaded. |
| 7004 | optional int64 angle_loading_count = 12; |
| 7005 | |
| 7006 | // Total count of the angle driver fails to be loaded. |
| 7007 | optional int64 angle_loading_failure_count = 13; |
Yiwei Zhang | 5c81b63 | 2019-03-01 15:39:46 -0800 | [diff] [blame] | 7008 | } |
| 7009 | |
Yiwei Zhang | 4fb9289 | 2019-03-04 14:29:25 -0800 | [diff] [blame] | 7010 | /** |
| 7011 | * GPU driver loading time info. |
| 7012 | */ |
| 7013 | message GpuDriverLoadingTime { |
| 7014 | // List of all the driver loading times for this app. The list size is |
| 7015 | // capped at 50. |
| 7016 | repeated int64 driver_loading_time = 1; |
| 7017 | } |
| 7018 | |
| 7019 | /** |
Yiwei Zhang | 5c81b63 | 2019-03-01 15:39:46 -0800 | [diff] [blame] | 7020 | * Logs the GPU stats per app health information. |
| 7021 | * |
| 7022 | * Logged from: |
| 7023 | * frameworks/native/services/gpuservice/gpustats/ |
| 7024 | */ |
| 7025 | message GpuStatsAppInfo { |
Yiwei Zhang | 4fb9289 | 2019-03-04 14:29:25 -0800 | [diff] [blame] | 7026 | // Package name of the application that loads the gpu driver. Total number |
| 7027 | // of different packages is capped at 100. |
Yiwei Zhang | 5c81b63 | 2019-03-01 15:39:46 -0800 | [diff] [blame] | 7028 | optional string app_package_name = 1; |
| 7029 | |
| 7030 | // Version code of the gpu driver this app loads. |
| 7031 | optional int64 driver_version_code = 2; |
| 7032 | |
Yiwei Zhang | 4fb9289 | 2019-03-04 14:29:25 -0800 | [diff] [blame] | 7033 | // gl driver loading time info. |
| 7034 | optional GpuDriverLoadingTime gl_driver_loading_time = 3 |
| 7035 | [(android.os.statsd.log_mode) = MODE_BYTES]; |
Yiwei Zhang | 5c81b63 | 2019-03-01 15:39:46 -0800 | [diff] [blame] | 7036 | |
Yiwei Zhang | 4fb9289 | 2019-03-04 14:29:25 -0800 | [diff] [blame] | 7037 | // Vulkan driver loading time info. |
| 7038 | optional GpuDriverLoadingTime vk_driver_loading_time = 4 |
| 7039 | [(android.os.statsd.log_mode) = MODE_BYTES]; |
Yiwei Zhang | a0f5fef | 2019-05-08 16:30:47 -0700 | [diff] [blame] | 7040 | |
| 7041 | // Angle driver loading time info. |
| 7042 | optional GpuDriverLoadingTime angle_driver_loading_time = 5 |
| 7043 | [(android.os.statsd.log_mode) = MODE_BYTES]; |
Yiwei Zhang | 7c70930 | 2019-05-09 15:00:46 -0700 | [diff] [blame] | 7044 | |
| 7045 | // CPU Vulkan implementation is in use. |
| 7046 | optional bool cpu_vulkan_in_use = 6; |
Yiwei Zhang | a763861 | 2019-07-03 17:34:12 -0700 | [diff] [blame] | 7047 | |
| 7048 | // App is not doing pre-rotation correctly. |
| 7049 | optional bool false_prerotation = 7; |
Yiwei Zhang | f02cf6b | 2019-12-20 14:51:07 -0800 | [diff] [blame] | 7050 | |
| 7051 | // App creates GLESv1 context. |
| 7052 | optional bool gles_1_in_use = 8; |
Yiwei Zhang | 5c81b63 | 2019-03-01 15:39:46 -0800 | [diff] [blame] | 7053 | } |
Rafal Slawik | d4e8757 | 2019-03-12 13:08:38 +0000 | [diff] [blame] | 7054 | |
| 7055 | /* |
| 7056 | * Logs the size of the system ion heap. |
| 7057 | * |
| 7058 | * Pulled from StatsCompanionService. |
| 7059 | */ |
| 7060 | message SystemIonHeapSize { |
Rafal Slawik | bdd5a50 | 2020-01-14 14:14:29 +0000 | [diff] [blame] | 7061 | // Deprecated due to limited support of ion stats in debugfs. |
| 7062 | // Use `IonHeapSize` instead. |
| 7063 | option deprecated = true; |
| 7064 | |
Rafal Slawik | d4e8757 | 2019-03-12 13:08:38 +0000 | [diff] [blame] | 7065 | // Size of the system ion heap in bytes. |
Rafal Slawik | bdd5a50 | 2020-01-14 14:14:29 +0000 | [diff] [blame] | 7066 | // Read from debugfs. |
Rafal Slawik | d4e8757 | 2019-03-12 13:08:38 +0000 | [diff] [blame] | 7067 | optional int64 size_in_bytes = 1; |
| 7068 | } |
Chiachang Wang | 0e88ebf | 2019-03-21 10:18:07 +0800 | [diff] [blame] | 7069 | |
Rafal Slawik | 77987ed | 2019-06-17 12:28:23 +0100 | [diff] [blame] | 7070 | /* |
Rafal Slawik | bdd5a50 | 2020-01-14 14:14:29 +0000 | [diff] [blame] | 7071 | * Logs the total size of the ion heap. |
| 7072 | * |
| 7073 | * Pulled from StatsCompanionService. |
| 7074 | */ |
| 7075 | message IonHeapSize { |
| 7076 | // Total size of all ion heaps in kilobytes. |
| 7077 | // Read from: /sys/kernel/ion/total_heaps_kb. |
| 7078 | optional int32 total_size_kb = 1; |
| 7079 | } |
| 7080 | |
| 7081 | /* |
Rafal Slawik | 77987ed | 2019-06-17 12:28:23 +0100 | [diff] [blame] | 7082 | * Logs the per-process size of the system ion heap. |
| 7083 | * |
| 7084 | * Pulled from StatsCompanionService. |
| 7085 | */ |
| 7086 | message ProcessSystemIonHeapSize { |
| 7087 | // The uid if available. -1 means not available. |
| 7088 | optional int32 uid = 1 [(is_uid) = true]; |
| 7089 | |
| 7090 | // The process name (from /proc/PID/cmdline). |
| 7091 | optional string process_name = 2; |
| 7092 | |
| 7093 | // Sum of sizes of all allocations. |
| 7094 | optional int32 total_size_in_kilobytes = 3; |
| 7095 | |
| 7096 | // Number of allocations. |
| 7097 | optional int32 allocation_count = 4; |
| 7098 | |
| 7099 | // Size of the largest allocation. |
| 7100 | optional int32 max_size_in_kilobytes = 5; |
| 7101 | } |
| 7102 | |
Chiachang Wang | 0e88ebf | 2019-03-21 10:18:07 +0800 | [diff] [blame] | 7103 | /** |
| 7104 | * Push network stack events. |
| 7105 | * |
| 7106 | * Log from: |
| 7107 | * frameworks/base/packages/NetworkStack/ |
| 7108 | */ |
| 7109 | message NetworkStackReported { |
Chiachang Wang | 729d267 | 2019-03-27 17:33:52 +0800 | [diff] [blame] | 7110 | // The id that indicates the event reported from NetworkStack. |
| 7111 | optional int32 event_id = 1; |
| 7112 | // The data for the reported events. |
Chiachang Wang | 0e88ebf | 2019-03-21 10:18:07 +0800 | [diff] [blame] | 7113 | optional android.stats.connectivity.NetworkStackEventData network_stack_event = 2 [(log_mode) = MODE_BYTES]; |
| 7114 | } |
Carmen Agimof | a769c15 | 2019-03-04 14:39:14 +0000 | [diff] [blame] | 7115 | |
| 7116 | /** |
| 7117 | * Logs the apps that are installed on the external storage. |
| 7118 | * Pulled from: |
| 7119 | * StatsCompanionService |
| 7120 | */ |
| 7121 | message AppsOnExternalStorageInfo { |
| 7122 | // The type of the external storage. |
| 7123 | optional android.stats.storage.ExternalStorageType external_storage_type = 1; |
| 7124 | // The name of the package that is installed on the external storage. |
| 7125 | optional string package_name = 2; |
| 7126 | } |
joshmccloskey | 34c1f8e | 2019-04-11 14:06:43 -0700 | [diff] [blame] | 7127 | |
| 7128 | /** |
| 7129 | * Logs the settings related to Face. |
| 7130 | * Logged from: |
| 7131 | * frameworks/base/services/core/java/com/android/server/stats |
| 7132 | */ |
| 7133 | message FaceSettings { |
| 7134 | // Whether or not face unlock is allowed on Keyguard. |
| 7135 | optional bool unlock_keyguard_enabled = 1; |
| 7136 | // Whether or not face unlock dismisses the Keyguard. |
| 7137 | optional bool unlock_dismisses_keyguard = 2; |
| 7138 | // Whether or not face unlock requires attention. |
| 7139 | optional bool unlock_attention_required = 3; |
| 7140 | // Whether or not face unlock is allowed for apps (through BiometricPrompt). |
| 7141 | optional bool unlock_app_enabled = 4; |
| 7142 | // Whether or not face unlock always requires user confirmation. |
| 7143 | optional bool unlock_always_require_confirmation = 5; |
| 7144 | // Whether or not a diverse set of poses are required during enrollment. |
| 7145 | optional bool unlock_diversity_required = 6; |
| 7146 | } |
Maggie White | 442b631 | 2019-04-05 16:26:44 -0700 | [diff] [blame] | 7147 | |
| 7148 | /** |
| 7149 | * Logs cooling devices maintained by the kernel. |
| 7150 | * |
| 7151 | * Pulled from StatsCompanionService.java |
| 7152 | */ |
| 7153 | message CoolingDevice { |
| 7154 | // The type of cooling device being reported. Eg. CPU, GPU... |
| 7155 | optional android.os.CoolingTypeEnum device_location = 1; |
| 7156 | // The name of the cooling device source. Eg. CPU0 |
| 7157 | optional string device_name = 2; |
| 7158 | // Current throttle state of the cooling device. The value can any unsigned |
| 7159 | // integer between 0 and max_state defined in its driver. 0 means device is |
| 7160 | // not in throttling, higher value means deeper throttling. |
| 7161 | optional int32 state = 3; |
| 7162 | } |
Ben Blount | 763a5d5 | 2019-04-10 11:48:58 -0700 | [diff] [blame] | 7163 | |
| 7164 | /** |
| 7165 | * Intelligence has several counter-type events that don't warrant a |
| 7166 | * full separate atom. These are primarily API call counters but also include |
| 7167 | * counters for feature usage and specific failure modes. |
| 7168 | * |
| 7169 | * Logged from the Intelligence mainline module. |
| 7170 | */ |
| 7171 | message IntelligenceEventReported { |
Ben Blount | 3658fa7 | 2019-04-22 17:31:40 -0700 | [diff] [blame] | 7172 | // The event type. |
Ben Blount | 763a5d5 | 2019-04-10 11:48:58 -0700 | [diff] [blame] | 7173 | optional android.stats.intelligence.EventType event_id = 1; |
Ben Blount | 3658fa7 | 2019-04-22 17:31:40 -0700 | [diff] [blame] | 7174 | // Success, failure. |
Ben Blount | 763a5d5 | 2019-04-10 11:48:58 -0700 | [diff] [blame] | 7175 | optional android.stats.intelligence.Status status = 2; |
Ben Blount | 3658fa7 | 2019-04-22 17:31:40 -0700 | [diff] [blame] | 7176 | // How many times the event occured (to report a batch of high frequency events). |
| 7177 | optional int32 count = 3; |
Ben Blount | e3223f3d | 2019-05-02 22:49:03 -0700 | [diff] [blame] | 7178 | // How long the event took (sum of durations if count > 1) |
Ben Blount | 3658fa7 | 2019-04-22 17:31:40 -0700 | [diff] [blame] | 7179 | optional int64 duration_millis = 4; |
Ben Blount | 763a5d5 | 2019-04-10 11:48:58 -0700 | [diff] [blame] | 7180 | } |
Andrew T Nguyen | ee615d6 | 2019-05-01 14:40:19 -0700 | [diff] [blame] | 7181 | |
| 7182 | /** |
Yuncheol Heo | d1a85d2 | 2019-05-08 17:13:42 -0700 | [diff] [blame] | 7183 | * Logs when Car Power state changed. |
| 7184 | * |
| 7185 | * Logged from: |
| 7186 | * packages/services/Car/service/src/com/android/car/CarStatsLog.java |
| 7187 | */ |
| 7188 | message CarPowerStateChanged { |
| 7189 | // States come from CpmsState in CarPowerManagementService.java. |
| 7190 | enum State { |
| 7191 | WAIT_FOR_VHAL = 0; |
| 7192 | ON = 1; |
| 7193 | SHUTDOWN_PREPARE = 2; |
| 7194 | WAIT_FOR_FINISH = 3; |
| 7195 | SUSPEND = 4; |
| 7196 | SIMULATE_SLEEP = 5; |
| 7197 | } |
| 7198 | optional State state = 1; |
| 7199 | } |
| 7200 | |
| 7201 | /** |
| 7202 | * Logs whether GarageMode is entered. |
| 7203 | * |
| 7204 | * Logged from: |
| 7205 | * packages/services/Car/service/src/com/android/car/CarStatsLog.java |
| 7206 | */ |
| 7207 | message GarageModeInfo { |
| 7208 | // Whether GarageMode is entered. |
| 7209 | optional bool is_garage_mode = 1; |
| 7210 | } |
Martijn Coenen | cd95d46 | 2019-04-25 17:09:45 +0200 | [diff] [blame] | 7211 | |
| 7212 | /** |
| 7213 | * Historical app ops data per package. |
| 7214 | */ |
| 7215 | message AppOps { |
| 7216 | // Uid of the package requesting the op |
| 7217 | optional int32 uid = 1 [(is_uid) = true]; |
| 7218 | |
Stanislav Zholnin | 606454c | 2019-11-27 15:31:49 +0000 | [diff] [blame] | 7219 | // Name of the package performing the op |
Martijn Coenen | cd95d46 | 2019-04-25 17:09:45 +0200 | [diff] [blame] | 7220 | optional string package_name = 2; |
| 7221 | |
| 7222 | // operation id; maps to the OP_* constants in AppOpsManager.java |
| 7223 | optional int32 op_id = 3; |
| 7224 | |
| 7225 | // The number of times the op was granted while the app was in the |
| 7226 | // foreground (only for trusted requests) |
| 7227 | optional int64 trusted_foreground_granted_count = 4; |
| 7228 | |
| 7229 | // The number of times the op was granted while the app was in the |
| 7230 | // background (only for trusted requests) |
| 7231 | optional int64 trusted_background_granted_count = 5; |
| 7232 | |
| 7233 | // The number of times the op was rejected while the app was in the |
| 7234 | // foreground (only for trusted requests) |
| 7235 | optional int64 trusted_foreground_rejected_count = 6; |
| 7236 | |
| 7237 | // The number of times the op was rejected while the app was in the |
| 7238 | // background (only for trusted requests) |
| 7239 | optional int64 trusted_background_rejected_count = 7; |
| 7240 | |
| 7241 | // For long-running operations, total duration of the operation |
| 7242 | // while the app was in the foreground (only for trusted requests) |
| 7243 | optional int64 trusted_foreground_duration_millis = 8; |
| 7244 | |
| 7245 | // For long-running operations, total duration of the operation |
| 7246 | // while the app was in the background (only for trusted requests) |
| 7247 | optional int64 trusted_background_duration_millis = 9; |
Stanislav Zholnin | 42d710e | 2019-11-28 13:11:54 +0000 | [diff] [blame] | 7248 | |
| 7249 | // Whether AppOps is guarded by Runtime permission |
| 7250 | optional bool is_runtime_permission = 10; |
Martijn Coenen | cd95d46 | 2019-04-25 17:09:45 +0200 | [diff] [blame] | 7251 | } |
Hongyi Zhang | 700137e | 2019-05-23 21:19:36 -0700 | [diff] [blame] | 7252 | |
| 7253 | /** |
| 7254 | * Location Manager API Usage information(e.g. API under usage, |
| 7255 | * API call's parameters). |
| 7256 | * Logged from: |
| 7257 | * frameworks/base/services/core/java/com/android/server/LocationManagerService.java |
| 7258 | */ |
| 7259 | message LocationManagerApiUsageReported { |
| 7260 | |
| 7261 | // Indicating if usage starts or usage ends. |
| 7262 | optional android.stats.location.UsageState state = 1; |
| 7263 | |
| 7264 | // LocationManagerService's API in use. |
| 7265 | // We can identify which API from LocationManager is |
| 7266 | // invoking current LMS API by the combination of |
| 7267 | // API parameter(e.g. is_listener_null, is_intent_null, |
| 7268 | // is_location_request_null) |
| 7269 | optional android.stats.location.LocationManagerServiceApi api_in_use = 2; |
| 7270 | |
| 7271 | // Name of the package calling the API. |
| 7272 | optional string calling_package_name = 3; |
| 7273 | |
| 7274 | // Type of the location provider. |
| 7275 | optional android.stats.location.ProviderType provider = 4; |
| 7276 | |
| 7277 | // Quality of the location request |
| 7278 | optional android.stats.location.LocationRequestQuality quality = 5; |
| 7279 | |
| 7280 | // The desired interval for active location updates, in milliseconds. |
| 7281 | // Bucketized to reduce cardinality. |
| 7282 | optional android.stats.location.LocationRequestIntervalBucket bucketized_interval = 6; |
| 7283 | |
| 7284 | // Minimum distance between location updates, in meters. |
| 7285 | // Bucketized to reduce cardinality. |
| 7286 | optional android.stats.location.SmallestDisplacementBucket |
| 7287 | bucketized_smallest_displacement = 7; |
| 7288 | |
| 7289 | // The number of location updates. |
| 7290 | optional int64 num_updates = 8; |
| 7291 | |
| 7292 | // The request expiration time, in millisecond since boot. |
| 7293 | // Bucketized to reduce cardinality. |
| 7294 | optional android.stats.location.ExpirationBucket |
| 7295 | bucketized_expire_in = 9; |
| 7296 | |
| 7297 | // Type of Callback passed in for this API. |
| 7298 | optional android.stats.location.CallbackType callback_type = 10; |
| 7299 | |
| 7300 | // The radius of the central point of the alert |
| 7301 | // region, in meters. Only for API REQUEST_GEOFENCE. |
| 7302 | // Bucketized to reduce cardinality. |
| 7303 | optional android.stats.location.GeofenceRadiusBucket bucketized_radius = 11; |
| 7304 | |
| 7305 | // Activity Importance of API caller. |
| 7306 | // Categorized to 3 types that are interesting from location's perspective. |
| 7307 | optional android.stats.location.ActivityImportance activiy_importance = 12; |
| 7308 | } |
Stanislav Zholnin | 3d215df1 | 2019-06-05 16:48:20 +0100 | [diff] [blame] | 7309 | |
| 7310 | /** |
| 7311 | * Information about a permission grant or denial made by user inside ReviewPermissionsFragment |
| 7312 | */ |
| 7313 | message ReviewPermissionsFragmentResultReported { |
| 7314 | // unique value identifying a permission group change. A permission group change might result |
| 7315 | // in multiple of these atoms |
| 7316 | optional int64 change_id = 1; |
| 7317 | |
| 7318 | // UID of package the permission belongs to |
| 7319 | optional int32 uid = 2 [(is_uid) = true]; |
| 7320 | |
| 7321 | // Name of package the permission belongs to |
| 7322 | optional string package_name = 3; |
| 7323 | |
| 7324 | // The permission to be granted |
| 7325 | optional string permission_name = 4; |
| 7326 | |
| 7327 | // The result of the permission grant |
| 7328 | optional bool permission_granted = 5; |
| 7329 | } |
Stanislav Zholnin | 247d1b7 | 2019-06-06 21:28:44 +0100 | [diff] [blame] | 7330 | |
| 7331 | /** |
| 7332 | * Information about results of permission upgrade by RuntimePermissionsUpgradeController |
| 7333 | * Logged from: RuntimePermissionUpdgradeController |
| 7334 | */ |
| 7335 | message RuntimePermissionsUpgradeResult { |
| 7336 | // Permission granted as result of upgrade |
| 7337 | optional string permission_name = 1; |
| 7338 | |
| 7339 | // UID of package granted permission |
| 7340 | optional int32 uid = 2 [(is_uid) = true]; |
| 7341 | |
| 7342 | // Name of package granted permission |
| 7343 | optional string package_name = 3; |
Stanislav Zholnin | bdf620b | 2019-06-06 22:38:33 +0100 | [diff] [blame] | 7344 | } |
| 7345 | |
| 7346 | /** |
| 7347 | * Information about a buttons presented in GrantPermissionsActivty and choice made by user |
| 7348 | */ |
| 7349 | message GrantPermissionsActivityButtonActions { |
| 7350 | // Permission granted as result of upgrade |
| 7351 | optional string permission_group_name = 1; |
| 7352 | |
| 7353 | // UID of package granted permission |
| 7354 | optional int32 uid = 2 [(is_uid) = true]; |
| 7355 | |
| 7356 | // Name of package requesting permission |
| 7357 | optional string package_name = 3; |
| 7358 | |
| 7359 | // Buttons presented in the dialog - bit flags, bit numbers are in accordance with |
| 7360 | // LABEL_ constants in GrantPermissionActivity.java |
| 7361 | optional int32 buttons_presented = 4; |
| 7362 | |
| 7363 | // Button clicked by user - same as bit flags in buttons_presented with only single bit set |
| 7364 | optional int32 button_clicked = 5; |
| 7365 | } |
Stanislav Zholnin | 375e2ab | 2019-05-29 13:07:35 +0100 | [diff] [blame] | 7366 | |
| 7367 | /** |
| 7368 | * Information about LocationAccessCheck notification presented to user |
| 7369 | */ |
| 7370 | message LocationAccessCheckNotificationAction { |
| 7371 | |
| 7372 | // id which identifies single session of user interacting with permission controller |
| 7373 | optional int64 session_id = 1; |
| 7374 | |
| 7375 | // Uid of package for which location access check is presented |
| 7376 | optional int32 package_uid = 2; |
| 7377 | |
| 7378 | // Name of package for which location access check is presented |
| 7379 | optional string package_name = 3; |
| 7380 | |
| 7381 | enum Result { |
| 7382 | UNDEFINED = 0; |
| 7383 | // notification was presented to the user |
| 7384 | NOTIFICATION_PRESENTED = 1; |
| 7385 | // notification was declined by the user |
| 7386 | NOTIFICATION_DECLINED = 2; |
| 7387 | // notification was clicked by the user |
| 7388 | NOTIFICATION_CLICKED = 3; |
| 7389 | } |
| 7390 | |
| 7391 | // View / interaction recorded |
| 7392 | optional Result result = 4; |
| 7393 | } |
Stanislav Zholnin | 3e0f9bc | 2019-05-23 19:03:55 +0100 | [diff] [blame] | 7394 | |
| 7395 | /** |
| 7396 | * Information about a permission grant or revoke made by user inside AppPermissionFragment |
| 7397 | */ |
| 7398 | message AppPermissionFragmentActionReported { |
| 7399 | // id which identifies single session of user interacting with permission controller |
| 7400 | optional int64 session_id = 1; |
| 7401 | |
| 7402 | // unique value identifying a permission group change. A permission group change might result |
| 7403 | // in multiple of these atoms |
| 7404 | optional int64 change_id = 2; |
| 7405 | |
| 7406 | // UID of package the permission belongs to |
| 7407 | optional int32 uid = 3 [(is_uid) = true]; |
| 7408 | |
| 7409 | // Name of package the permission belongs to |
| 7410 | optional string package_name = 4; |
| 7411 | |
| 7412 | // The permission to be granted |
| 7413 | optional string permission_name = 5; |
| 7414 | |
| 7415 | // The result of the permission grant |
| 7416 | optional bool permission_granted = 6; |
| 7417 | } |
Stanislav Zholnin | c9dda9e | 2019-06-02 20:50:13 +0100 | [diff] [blame] | 7418 | |
| 7419 | /** |
| 7420 | * Information about a AppPermissionFragment viewed by user |
| 7421 | */ |
| 7422 | message AppPermissionFragmentViewed { |
| 7423 | // id which identifies single session of user interacting with permission controller |
| 7424 | optional int64 session_id = 1; |
| 7425 | |
| 7426 | // UID of package for which permissions are viewed |
| 7427 | optional int32 uid = 2 [(is_uid) = true]; |
| 7428 | |
| 7429 | // Name of package for which permissions are viewed |
| 7430 | optional string package_name = 3; |
| 7431 | |
| 7432 | // Permission group viewed |
| 7433 | optional string permission_group_name = 4; |
| 7434 | } |
Stanislav Zholnin | dc3e2b3 | 2019-06-06 18:10:14 +0100 | [diff] [blame] | 7435 | |
| 7436 | /** |
| 7437 | * Information about a AppPermissionsFragment viewed by user |
| 7438 | */ |
| 7439 | message AppPermissionsFragmentViewed { |
| 7440 | // id which identifies single session of user interacting with permission controller |
| 7441 | optional int64 session_id = 1; |
| 7442 | |
| 7443 | // id which identifies single view as every view might have several logging records |
| 7444 | // with different package information attached |
| 7445 | optional int64 view_id = 2; |
| 7446 | |
| 7447 | // Permission group viewed |
| 7448 | optional string permission_group_name = 3; |
| 7449 | |
| 7450 | // UID of package for which permissions are viewed |
| 7451 | optional int32 uid = 4 [(is_uid) = true]; |
| 7452 | |
| 7453 | // Name of package for which permissions are viewed |
| 7454 | optional string package_name = 5; |
| 7455 | |
| 7456 | // Category in which permission is included |
| 7457 | enum Category { |
| 7458 | UNDEFINED = 0; |
| 7459 | ALLOWED = 1; |
| 7460 | ALLOWED_FOREGROUND = 2; |
| 7461 | DENIED = 3; |
| 7462 | } |
| 7463 | optional Category category = 6; |
| 7464 | } |
Stanislav Zholnin | 32a89c1 | 2019-06-04 14:59:21 +0100 | [diff] [blame] | 7465 | |
| 7466 | /** |
| 7467 | * Information about a PermissionAppsFragment viewed by user. |
| 7468 | * Logged from ui/handheld/PermissionAppsFragment.java |
| 7469 | */ |
| 7470 | message PermissionAppsFragmentViewed { |
| 7471 | // id which identifies single session of user interacting with permission controller |
| 7472 | optional int64 session_id = 1; |
| 7473 | |
| 7474 | // id which identifies single view as every view might have several logging records |
| 7475 | // with different package information attached |
| 7476 | optional int64 view_id = 2; |
| 7477 | |
| 7478 | // Permission group viewed |
| 7479 | optional string permission_group_name = 3; |
| 7480 | |
| 7481 | // UID of package for which permissions are viewed |
| 7482 | optional int32 uid = 4 [(is_uid) = true]; |
| 7483 | |
| 7484 | // Name of package for which permissions are viewed |
| 7485 | optional string package_name = 5; |
| 7486 | |
| 7487 | // Category in which app is included |
| 7488 | enum Category { |
| 7489 | UNDEFINED = 0; |
| 7490 | ALLOWED = 1; |
| 7491 | ALLOWED_FOREGROUND = 2; |
| 7492 | DENIED = 3; |
| 7493 | } |
| 7494 | optional Category category = 6; |
| 7495 | } |
Tony Mak | e2b1b67 | 2019-07-29 16:59:47 +0100 | [diff] [blame] | 7496 | |
| 7497 | /** |
| 7498 | * Logs when there is a smart selection related event. |
| 7499 | * See frameworks/base/core/java/android/view/textclassifier/TextClassifierEvent.java |
| 7500 | * Logged from: TextClassifierEventLogger.java |
| 7501 | */ |
| 7502 | message TextSelectionEvent { |
| 7503 | // A session ID. |
| 7504 | optional string session_id = 1; |
| 7505 | |
| 7506 | // Event type of this event. |
| 7507 | optional android.stats.textclassifier.EventType event_type = 2; |
| 7508 | |
Tony Mak | 9c84bd2 | 2019-12-09 07:27:25 +0000 | [diff] [blame] | 7509 | // Name of the annotator model that is involved in this event. |
Tony Mak | e2b1b67 | 2019-07-29 16:59:47 +0100 | [diff] [blame] | 7510 | optional string model_name = 3; |
| 7511 | |
| 7512 | // Type of widget that was involved in triggering this event. |
| 7513 | optional android.stats.textclassifier.WidgetType widget_type = 4; |
| 7514 | |
| 7515 | // Index of this event in a session. |
| 7516 | optional int32 event_index = 5; |
| 7517 | |
| 7518 | // Entity type that is involved. |
| 7519 | optional string entity_type = 6; |
| 7520 | |
| 7521 | // Relative word index of the start of the selection. |
| 7522 | optional int32 relative_word_start_index = 7; |
| 7523 | |
| 7524 | // Relative word (exclusive) index of the end of the selection. |
| 7525 | optional int32 relative_word_end_index = 8; |
| 7526 | |
| 7527 | // Relative word index of the start of the smart selection. |
| 7528 | optional int32 relative_suggested_word_start_index = 9; |
| 7529 | |
| 7530 | // Relative word (exclusive) index of the end of the smart selection. |
| 7531 | optional int32 relative_suggested_word_end_index = 10; |
Tony Mak | 98b59f0 | 2019-08-07 11:50:58 +0100 | [diff] [blame] | 7532 | |
| 7533 | // Name of source package. |
| 7534 | optional string package_name = 11; |
Tony Mak | e2b1b67 | 2019-07-29 16:59:47 +0100 | [diff] [blame] | 7535 | } |
| 7536 | |
| 7537 | /** |
| 7538 | * Logs when there is a smart linkify related event. |
| 7539 | * See frameworks/base/core/java/android/view/textclassifier/TextClassifierEvent.java |
| 7540 | * Logged from: TextClassifierEventLogger.java |
| 7541 | */ |
| 7542 | message TextLinkifyEvent { |
| 7543 | // A session ID. |
| 7544 | optional string session_id = 1; |
| 7545 | |
| 7546 | // Event type of this event. |
| 7547 | optional android.stats.textclassifier.EventType event_type = 2; |
| 7548 | |
Tony Mak | 9c84bd2 | 2019-12-09 07:27:25 +0000 | [diff] [blame] | 7549 | // Name of the annotator model that is involved in this event. |
Tony Mak | e2b1b67 | 2019-07-29 16:59:47 +0100 | [diff] [blame] | 7550 | optional string model_name = 3; |
| 7551 | |
| 7552 | // Type of widget that was involved in triggering this event. |
| 7553 | optional android.stats.textclassifier.WidgetType widget_type = 4; |
| 7554 | |
| 7555 | // Index of this event in a session. |
| 7556 | optional int32 event_index = 5; |
| 7557 | |
| 7558 | // Entity type that is involved. |
| 7559 | optional string entity_type = 6; |
| 7560 | |
| 7561 | // Number of links detected. |
| 7562 | optional int32 num_links = 7; |
| 7563 | |
| 7564 | // The total length of all links. |
| 7565 | optional int32 linked_text_length = 8; |
| 7566 | |
| 7567 | // Length of input text. |
| 7568 | optional int32 text_length = 9; |
| 7569 | |
| 7570 | // Time spent on generating links in ms. |
| 7571 | optional int64 latency_millis = 10; |
Tony Mak | 98b59f0 | 2019-08-07 11:50:58 +0100 | [diff] [blame] | 7572 | |
| 7573 | // Name of source package. |
| 7574 | optional string package_name = 11; |
Tony Mak | e2b1b67 | 2019-07-29 16:59:47 +0100 | [diff] [blame] | 7575 | } |
| 7576 | |
| 7577 | /** |
| 7578 | * Logs when there is a conversation actions related event. |
| 7579 | * See frameworks/base/core/java/android/view/textclassifier/TextClassifierEvent.java |
| 7580 | * Logged from: TextClassifierEventLogger.java |
| 7581 | */ |
| 7582 | message ConversationActionsEvent { |
| 7583 | // A session ID. |
| 7584 | optional string session_id = 1; |
| 7585 | |
| 7586 | // Event type of this event. |
| 7587 | optional android.stats.textclassifier.EventType event_type = 2; |
| 7588 | |
Tony Mak | 9c84bd2 | 2019-12-09 07:27:25 +0000 | [diff] [blame] | 7589 | // Name of the actions model that is involved in this event. |
Tony Mak | e2b1b67 | 2019-07-29 16:59:47 +0100 | [diff] [blame] | 7590 | optional string model_name = 3; |
| 7591 | |
| 7592 | // Type of widget that was involved in triggering this event. |
| 7593 | optional android.stats.textclassifier.WidgetType widget_type = 4; |
| 7594 | |
| 7595 | // The first entity type that is involved. |
| 7596 | optional string first_entity_type = 5; |
| 7597 | |
| 7598 | // The second entity type that is involved. |
| 7599 | optional string second_entity_type = 6; |
| 7600 | |
| 7601 | // The third entity type that is involved. |
| 7602 | optional string third_entity_type = 7; |
| 7603 | |
| 7604 | // The score of the first entity type. |
| 7605 | optional float score = 8; |
Tony Mak | 98b59f0 | 2019-08-07 11:50:58 +0100 | [diff] [blame] | 7606 | |
| 7607 | // Name of source package. |
| 7608 | optional string package_name = 9; |
Tony Mak | 9c84bd2 | 2019-12-09 07:27:25 +0000 | [diff] [blame] | 7609 | |
| 7610 | // Name of the annotator model that is involved in this event. |
| 7611 | optional string annotator_model_name = 10; |
Tony Mak | e2b1b67 | 2019-07-29 16:59:47 +0100 | [diff] [blame] | 7612 | } |
| 7613 | |
| 7614 | /** |
| 7615 | * Logs when there is a language detection related event. |
| 7616 | * See frameworks/base/core/java/android/view/textclassifier/TextClassifierEvent.java |
| 7617 | * Logged from: TextClassifierEventLogger.java |
| 7618 | */ |
| 7619 | message LanguageDetectionEvent { |
| 7620 | // A session ID. |
| 7621 | optional string session_id = 1; |
| 7622 | |
| 7623 | // Event type of this event. |
| 7624 | optional android.stats.textclassifier.EventType event_type = 2; |
| 7625 | |
Tony Mak | 9c84bd2 | 2019-12-09 07:27:25 +0000 | [diff] [blame] | 7626 | // Name of the language detection model that is involved in this event. |
Tony Mak | e2b1b67 | 2019-07-29 16:59:47 +0100 | [diff] [blame] | 7627 | optional string model_name = 3; |
| 7628 | |
| 7629 | // Type of widget that was involved in triggering this event. |
| 7630 | optional android.stats.textclassifier.WidgetType widget_type = 4; |
| 7631 | |
| 7632 | // Detected language. |
| 7633 | optional string language_tag = 5; |
| 7634 | |
| 7635 | // Score of the detected language. |
| 7636 | optional float score = 6; |
| 7637 | |
| 7638 | // Position of this action. |
| 7639 | optional int32 action_index = 7; |
Tony Mak | 98b59f0 | 2019-08-07 11:50:58 +0100 | [diff] [blame] | 7640 | |
| 7641 | // Name of source package. |
| 7642 | optional string package_name = 8; |
Tony Mak | e2b1b67 | 2019-07-29 16:59:47 +0100 | [diff] [blame] | 7643 | } |
Tianjie Xu | 167c3db | 2019-07-22 14:25:14 -0700 | [diff] [blame] | 7644 | |
| 7645 | /** |
| 7646 | * Information about an OTA update attempt by update_engine. |
| 7647 | * Logged from platform/system/update_engine/metrics_reporter_android.cc |
| 7648 | */ |
| 7649 | message UpdateEngineUpdateAttemptReported { |
| 7650 | // The number of attempts for the update engine to apply a given payload. |
| 7651 | optional int32 attempt_number = 1; |
| 7652 | |
| 7653 | optional android.stats.otaupdate.PayloadType payload_type = 2; |
| 7654 | |
| 7655 | // The total time in minutes for the update engine to apply a given payload. |
| 7656 | // The time is calculated by calling clock_gettime() / CLOCK_BOOTTIME; and |
| 7657 | // it's increased when the system is sleeping. |
| 7658 | optional int32 duration_boottime_in_minutes = 3; |
| 7659 | |
| 7660 | // The total time in minutes for the update engine to apply a given payload. |
| 7661 | // The time is calculated by calling clock_gettime() / CLOCK_MONOTONIC_RAW; |
| 7662 | // and it's not increased when the system is sleeping. |
| 7663 | optional int32 duration_monotonic_in_minutes = 4; |
| 7664 | |
| 7665 | // The size of the payload in MiBs. |
| 7666 | optional int32 payload_size_mib = 5; |
| 7667 | |
| 7668 | // The attempt result reported by the update engine for an OTA update. |
| 7669 | optional android.stats.otaupdate.AttemptResult attempt_result = 6; |
| 7670 | |
| 7671 | // The error code reported by the update engine after an OTA update attempt |
| 7672 | // on A/B devices. |
| 7673 | optional android.stats.otaupdate.ErrorCode error_code = 7; |
| 7674 | |
| 7675 | // The build fingerprint of the source system. The value is read from a |
| 7676 | // system property when the device takes the update. e.g. |
| 7677 | // Android/aosp_sailfish/sailfish:10/QP1A.190425.004/5507117:userdebug/test-keys |
| 7678 | optional string source_fingerprint = 8; |
| 7679 | } |
| 7680 | |
| 7681 | /** |
| 7682 | * Information about all the attempts the device make before finishing the |
| 7683 | * successful update. |
| 7684 | * Logged from platform/system/update_engine/metrics_reporter_android.cc |
| 7685 | */ |
| 7686 | message UpdateEngineSuccessfulUpdateReported { |
| 7687 | // The number of attempts for the update engine to apply the payload for a |
| 7688 | // successful update. |
| 7689 | optional int32 attempt_count = 1; |
| 7690 | |
| 7691 | optional android.stats.otaupdate.PayloadType payload_type = 2; |
| 7692 | |
| 7693 | optional int32 payload_size_mib = 3; |
| 7694 | |
| 7695 | // The total number of bytes downloaded by update_engine since the last |
| 7696 | // successful update. |
| 7697 | optional int32 total_bytes_downloaded_mib = 4; |
| 7698 | |
| 7699 | // The ratio in percentage of the over-downloaded bytes compared to the |
| 7700 | // total bytes needed to successfully install the update. e.g. 200 if we |
| 7701 | // download 200MiB in total for a 100MiB package. |
| 7702 | optional int32 download_overhead_percentage = 5; |
| 7703 | |
| 7704 | // The total time in minutes for the update engine to apply the payload for a |
| 7705 | // successful update. |
| 7706 | optional int32 total_duration_minutes = 6; |
| 7707 | |
| 7708 | // The number of reboot of the device during a successful update. |
| 7709 | optional int32 reboot_count = 7; |
| 7710 | } |
Alec Mouri | e088e76 | 2019-07-02 13:10:55 -0700 | [diff] [blame] | 7711 | |
| 7712 | /** |
Kenny Root | 4eacaaa | 2020-01-08 20:48:13 -0800 | [diff] [blame] | 7713 | * Reported when the RebootEscrow HAL has attempted to recover the escrowed |
| 7714 | * key to indicate whether it was successful or not. |
| 7715 | * |
| 7716 | * Logged from: |
| 7717 | * frameworks/base/services/core/java/com/android/server/locksettings/RebootEscrowManager.java |
| 7718 | */ |
| 7719 | message RebootEscrowRecoveryReported { |
| 7720 | optional bool successful = 1; |
| 7721 | } |
| 7722 | |
| 7723 | /** |
Alec Mouri | e088e76 | 2019-07-02 13:10:55 -0700 | [diff] [blame] | 7724 | * Global display pipeline metrics reported by SurfaceFlinger. |
| 7725 | * Pulled from: |
| 7726 | * frameworks/native/services/surfaceflinger/TimeStats/TimeStats.cpp |
| 7727 | */ |
| 7728 | message SurfaceflingerStatsGlobalInfo { |
| 7729 | // Total number of frames presented during the tracing period |
| 7730 | optional int64 total_frames = 1; |
| 7731 | // Total number of frames missed |
| 7732 | optional int64 missed_frames = 2; |
| 7733 | // Total number of frames that fell back to client composition |
| 7734 | optional int64 client_composition_frames = 3; |
| 7735 | // Total time the display was turned on |
| 7736 | optional int64 display_on_millis = 4; |
| 7737 | // Total time that was spent performing animations. |
| 7738 | // This is derived from the present-to-present layer histogram |
| 7739 | optional int64 animation_millis = 5; |
| 7740 | } |
| 7741 | |
| 7742 | /** |
| 7743 | * Per-layer display pipeline metrics reported by SurfaceFlinger. |
| 7744 | * The number of layers uploaded will be restricted due to size limitations. |
| 7745 | * Pulled from: |
| 7746 | * frameworks/native/services/surfaceflinger/TimeStats/TimeStats.cpp |
| 7747 | */ |
| 7748 | message SurfaceflingerStatsLayerInfo { |
| 7749 | // The layer for this set of metrics |
| 7750 | // For now we can infer that the package name is included in the layer |
| 7751 | // name. |
| 7752 | optional string layer_name = 1; |
| 7753 | // Total number of frames presented |
| 7754 | optional int64 total_frames = 2; |
| 7755 | // Total number of dropped frames while latching a buffer for this layer. |
| 7756 | optional int64 dropped_frames = 3; |
| 7757 | // Set of timings measured between successive presentation timestamps. |
| 7758 | optional FrameTimingHistogram present_to_present = 4 |
| 7759 | [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 7760 | // Set of timings measured from when an app queued a buffer for |
| 7761 | // presentation, until the buffer was actually presented to the |
| 7762 | // display. |
| 7763 | optional FrameTimingHistogram post_to_present = 5 |
| 7764 | [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 7765 | // Set of timings measured from when a buffer is ready to be presented, |
| 7766 | // until the buffer was actually presented to the display. |
| 7767 | optional FrameTimingHistogram acquire_to_present = 6 |
| 7768 | [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 7769 | // Set of timings measured from when a buffer was latched by |
| 7770 | // SurfaceFlinger, until the buffer was presented to the display |
| 7771 | optional FrameTimingHistogram latch_to_present = 7 |
| 7772 | [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 7773 | // Set of timings measured from the desired presentation to the actual |
| 7774 | // presentation time |
| 7775 | optional FrameTimingHistogram desired_to_present = 8 |
| 7776 | [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 7777 | // Set of timings measured from when an app queued a buffer for |
| 7778 | // presentation, until the buffer was ready to be presented. |
| 7779 | optional FrameTimingHistogram post_to_acquire = 9 |
| 7780 | [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 7781 | } |
| 7782 | |
| 7783 | /** |
| 7784 | * Histogram of frame counts bucketed by time in milliseconds. |
| 7785 | * Because of size limitations, we hard-cap the number of buckets, with |
| 7786 | * buckets for corresponding to larger milliseconds being less precise. |
| 7787 | */ |
| 7788 | message FrameTimingHistogram { |
| 7789 | // Timings in milliseconds that describes a set of histogram buckets |
| 7790 | repeated int32 time_millis_buckets = 1; |
| 7791 | // Number of frames that match to each time_millis, i.e. the bucket |
| 7792 | // contents |
| 7793 | // It's required that len(time_millis) == len(frame_count) |
| 7794 | repeated int64 frame_counts = 2; |
| 7795 | } |
Emilian Peev | 6729f37 | 2019-08-29 09:14:09 -0700 | [diff] [blame] | 7796 | |
Emilian Peev | 6729f37 | 2019-08-29 09:14:09 -0700 | [diff] [blame] | 7797 | /** |
| 7798 | * Information about camera facing and API level usage. |
| 7799 | * Logged from: |
| 7800 | * frameworks/base/services/core/java/com/android/server/camera/CameraServiceProxy.java |
| 7801 | */ |
| 7802 | message CameraActionEvent { |
| 7803 | // Camera session duration |
| 7804 | optional int64 duration = 1; |
| 7805 | |
| 7806 | // Camera API level used |
| 7807 | optional int32 api_level = 2; |
| 7808 | |
| 7809 | // Name of client package |
| 7810 | optional string package_name = 3; |
| 7811 | |
| 7812 | // Camera facing |
| 7813 | enum Facing { |
| 7814 | UNKNOWN = 0; |
| 7815 | BACK = 1; |
| 7816 | FRONT = 2; |
| 7817 | EXTERNAL = 3; |
| 7818 | } |
| 7819 | optional Facing facing = 4; |
| 7820 | } |
atrost | 01a2093 | 2019-08-28 15:40:37 +0100 | [diff] [blame] | 7821 | |
| 7822 | /** |
| 7823 | * Logs when a compatibility change is affecting an app. |
| 7824 | * |
| 7825 | * Logged from: |
| 7826 | * frameworks/base/core/java/android/app/AppCompatCallbacks.java and |
| 7827 | * frameworks/base/services/core/java/com/android/server/compat/PlatformCompat.java |
| 7828 | */ |
| 7829 | message AppCompatibilityChangeReported { |
| 7830 | // The UID of the app being affected by the compatibilty change. |
| 7831 | optional int32 uid = 1 [(is_uid) = true]; |
| 7832 | |
| 7833 | // The ID of the change affecting the app. |
| 7834 | optional int64 change_id = 2; |
| 7835 | |
| 7836 | enum State { |
| 7837 | UNKNOWN_STATE = 0; |
| 7838 | ENABLED = 1; |
| 7839 | DISABLED = 2; |
| 7840 | LOGGED = 3; |
| 7841 | } |
| 7842 | |
| 7843 | // The state of the change - if logged from gating whether it was enabled or disabled, or just |
| 7844 | // logged otherwise. |
| 7845 | optional State state = 3; |
| 7846 | |
| 7847 | enum Source { |
| 7848 | UNKNOWN_SOURCE = 0; |
| 7849 | APP_PROCESS = 1; |
| 7850 | SYSTEM_SERVER = 2; |
| 7851 | } |
| 7852 | |
| 7853 | // Where it was logged from. |
| 7854 | optional Source source = 4; |
| 7855 | |
| 7856 | } |
Hector Dearman | 40579f6 | 2019-11-01 13:19:30 +0000 | [diff] [blame] | 7857 | |
| 7858 | /** |
| 7859 | * Logged from |
| 7860 | * external/perfetto/src/perfetto_cmd/perfetto_cmd.cc |
| 7861 | */ |
| 7862 | message PerfettoUploaded { |
| 7863 | enum Event { |
| 7864 | PERFETTO_UNDEFINED = 0; |
| 7865 | PERFETTO_TRACE_BEGIN = 1; |
| 7866 | PERFETTO_BACKGROUND_TRACE_BEGIN = 2; |
| 7867 | PERFETTO_ON_CONNECT = 3; |
| 7868 | PERFETTO_ON_TRACING_DISABLED = 4; |
| 7869 | PERFETTO_UPLOAD_DROPBOX_BEGIN = 5; |
| 7870 | PERFETTO_UPLOAD_DROPBOX_SUCCESS = 6; |
| 7871 | PERFETTO_UPLOAD_DROPBOX_FAILURE = 7; |
| 7872 | PERFETTO_UPLOAD_INCIDENT_BEGIN = 8; |
| 7873 | PERFETTO_UPLOAD_INCIDENT_SUCCESS = 9; |
| 7874 | PERFETTO_UPLOAD_INCIDENT_FAILURE = 10; |
| 7875 | PERFETTO_FINALIZE_TRACE_AND_EXIT = 11; |
| 7876 | PERFETTO_TRIGGER_BEGIN = 12; |
| 7877 | PERFETTO_TRIGGER_SUCCESS = 13; |
| 7878 | PERFETTO_TRIGGER_FAILURE = 14; |
| 7879 | PERFETTO_HIT_GUARDRAILS = 15; |
| 7880 | PERFETTO_ON_TIMEOUT = 16; |
| 7881 | PERFETTO_NOT_UPLOADING_EMPTY_TRACE = 17; |
| 7882 | } |
| 7883 | |
| 7884 | // Which stage of the pipeline we are reporting from. |
| 7885 | optional Event event = 1; |
| 7886 | |
| 7887 | // UUID matching the one set inside the SystemInfo trace packet. |
| 7888 | optional int64 trace_uuid_lsb = 2; |
| 7889 | optional int64 trace_uuid_msb = 3; |
| 7890 | } |
Mark Tabry | a824a64 | 2019-11-05 12:26:12 -0800 | [diff] [blame] | 7891 | |
| 7892 | /** |
| 7893 | * Pulls client metrics on data transferred via Vehicle Maps Service. |
| 7894 | * Metrics are keyed by uid + layer. |
| 7895 | * |
| 7896 | * Pulled from: |
| 7897 | * packages/services/Car/service/src/com/android/car/stats/CarStatsService.java |
| 7898 | */ |
| 7899 | message VmsClientStats { |
| 7900 | // UID of the VMS client app |
| 7901 | optional int32 uid = 1 [(is_uid) = true]; |
| 7902 | |
| 7903 | // VMS layer definition |
| 7904 | optional int32 layer_type = 2; |
| 7905 | optional int32 layer_channel = 3; |
| 7906 | optional int32 layer_version = 4; |
| 7907 | |
| 7908 | // Bytes and packets sent by the client for the layer |
| 7909 | optional int64 tx_bytes = 5; |
| 7910 | optional int64 tx_packets = 6; |
| 7911 | |
| 7912 | // Bytes and packets received by the client for the layer |
| 7913 | optional int64 rx_bytes = 7; |
| 7914 | optional int64 rx_packets = 8; |
| 7915 | |
| 7916 | // Bytes and packets dropped due to client error |
| 7917 | optional int64 dropped_bytes = 9; |
| 7918 | optional int64 dropped_packets = 10; |
| 7919 | } |
Stanislav Zholnin | ccb82e4 | 2019-11-29 18:59:49 +0000 | [diff] [blame] | 7920 | |
| 7921 | /** |
| 7922 | * State of a dangerous permission requested by a package - sampled |
| 7923 | * Pulled from: StatsCompanionService.java with data obtained from PackageManager API |
| 7924 | */ |
| 7925 | message DangerousPermissionStateSampled { |
| 7926 | // Name of the permission |
| 7927 | optional string permission_name = 1; |
| 7928 | |
| 7929 | // Uid of the package |
| 7930 | optional int32 uid = 2 [(is_uid) = true]; |
| 7931 | |
| 7932 | // If the permission is granted to the uid |
| 7933 | optional bool is_granted = 3; |
| 7934 | |
| 7935 | // Permission flags as per android.content.pm.PermissionFlags |
| 7936 | optional int32 permission_flags = 4; |
| 7937 | } |
| 7938 | |
Stan Iliev | 637ba5e | 2019-08-16 13:43:08 -0400 | [diff] [blame] | 7939 | /** |
| 7940 | * HWUI renders pipeline type: GL (0) or Vulkan (1). |
| 7941 | */ |
| 7942 | enum PipelineType { |
| 7943 | GL = 0; |
| 7944 | VULKAN = 1; |
| 7945 | } |
| 7946 | |
| 7947 | /** |
| 7948 | * HWUI stats for a given app. |
| 7949 | */ |
| 7950 | message GraphicsStats { |
| 7951 | // The package name of the app |
| 7952 | optional string package_name = 1; |
| 7953 | |
| 7954 | // The version code of the app |
| 7955 | optional int64 version_code = 2; |
| 7956 | |
| 7957 | // The start & end timestamps in UTC as |
| 7958 | // milliseconds since January 1, 1970 |
| 7959 | // Compatible with java.util.Date#setTime() |
| 7960 | optional int64 stats_start = 3; |
| 7961 | |
| 7962 | optional int64 stats_end = 4; |
| 7963 | |
| 7964 | // HWUI renders pipeline type: GL or Vulkan. |
| 7965 | optional PipelineType pipeline = 5; |
| 7966 | |
| 7967 | // Distinct frame count. |
| 7968 | optional int32 total_frames = 6; |
| 7969 | |
| 7970 | // Number of "missed vsync" events. |
| 7971 | optional int32 missed_vsync_count = 7; |
| 7972 | |
| 7973 | // Number of frames in triple-buffering scenario (high input latency) |
| 7974 | optional int32 high_input_latency_count = 8; |
| 7975 | |
| 7976 | // Number of "slow UI thread" events. |
| 7977 | optional int32 slow_ui_thread_count = 9; |
| 7978 | |
| 7979 | // Number of "slow bitmap upload" events. |
| 7980 | optional int32 slow_bitmap_upload_count = 10; |
| 7981 | |
| 7982 | // Number of "slow draw" events. |
| 7983 | optional int32 slow_draw_count = 11; |
| 7984 | |
| 7985 | // Number of frames that missed their deadline (aka, visibly janked) |
| 7986 | optional int32 missed_deadline_count = 12; |
| 7987 | |
| 7988 | // The frame time histogram for the package |
| 7989 | optional FrameTimingHistogram cpu_histogram = 13 |
| 7990 | [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 7991 | |
| 7992 | // The gpu frame time histogram for the package |
| 7993 | optional FrameTimingHistogram gpu_histogram = 14 |
| 7994 | [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 7995 | |
| 7996 | // UI mainline module version. |
| 7997 | optional int64 version_ui_module = 15; |
| 7998 | |
| 7999 | // If true, these are HWUI stats for up to a 24h period for a given app from today. |
| 8000 | // If false, these are HWUI stats for a 24h period for a given app from the last complete |
| 8001 | // day (yesterday). Stats from yesterday stay constant, while stats from today may change as |
| 8002 | // more apps are running / rendering. |
| 8003 | optional bool is_today = 16; |
| 8004 | } |
Stanislav Zholnin | 606454c | 2019-11-27 15:31:49 +0000 | [diff] [blame] | 8005 | |
| 8006 | /** |
| 8007 | * Message related to dangerous (runtime) app ops access |
| 8008 | */ |
| 8009 | message RuntimeAppOpsAccess { |
| 8010 | // Uid of the package accessing app op |
| 8011 | optional int32 uid = 1 [(is_uid) = true]; |
| 8012 | |
| 8013 | // Name of the package accessing app op |
| 8014 | optional string package_name = 2; |
| 8015 | |
| 8016 | // operation id; maps to the OP_* constants in AppOpsManager.java |
| 8017 | optional int32 op_id = 3; |
| 8018 | |
| 8019 | // feature id; provided by developer when accessing related API, limited at 50 chars by API. |
| 8020 | // Features must be provided through manifest using <feature> tag available in R and above. |
| 8021 | optional string feature_id = 4; |
| 8022 | |
| 8023 | // message related to app op access, limited to 600 chars by API |
| 8024 | optional string message = 5; |
| 8025 | |
| 8026 | enum SamplingStrategy { |
| 8027 | DEFAULT = 0; |
| 8028 | UNIFORM = 1; |
| 8029 | RARELY_USED = 2; |
| 8030 | } |
| 8031 | |
| 8032 | // sampling strategy used to collect this message |
| 8033 | optional SamplingStrategy sampling_strategy = 6; |
| 8034 | } |
| 8035 | |
Nikita Ioffe | 41dd57e | 2020-01-10 16:05:08 +0000 | [diff] [blame] | 8036 | /* |
| 8037 | * Logs userspace reboot outcome and duration. |
| 8038 | * |
| 8039 | * Logged from: |
| 8040 | * frameworks/base/core/java/com/android/server/BootReceiver.java |
| 8041 | */ |
| 8042 | message UserspaceRebootReported { |
| 8043 | // Possible outcomes of userspace reboot. |
| 8044 | enum Outcome { |
| 8045 | // Default value in case platform failed to determine the outcome. |
| 8046 | OUTCOME_UNKNOWN = 0; |
| 8047 | // Userspace reboot succeeded (i.e. boot completed without a fall back to hard reboot). |
| 8048 | SUCCESS = 1; |
| 8049 | // Userspace reboot shutdown sequence was aborted. |
| 8050 | FAILED_SHUTDOWN_SEQUENCE_ABORTED = 2; |
| 8051 | // Remounting userdata into checkpointing mode failed. |
| 8052 | FAILED_USERDATA_REMOUNT = 3; |
| 8053 | // Device didn't finish booting before timeout and userspace reboot watchdog issued a hard |
| 8054 | // reboot. |
| 8055 | FAILED_USERSPACE_REBOOT_WATCHDOG_TRIGGERED = 4; |
| 8056 | } |
| 8057 | // Outcome of userspace reboot. Always set. |
| 8058 | optional Outcome outcome = 1; |
| 8059 | // Duration of userspace reboot in case it has a successful outcome. |
| 8060 | // Duration is measured as time between userspace reboot was initiated and until boot completed |
| 8061 | // (e.g. sys.boot_completed=1). |
| 8062 | optional int64 duration_millis = 2; |
| 8063 | // State of primary user's (user0) credential encryption storage. |
| 8064 | enum UserEncryptionState { |
| 8065 | // Default value. |
| 8066 | USER_ENCRYPTION_STATE_UNKNOWN = 0; |
| 8067 | // Credential encrypted storage is unlocked. |
| 8068 | UNLOCKED = 1; |
| 8069 | // Credential encrypted storage is locked. |
| 8070 | LOCKED = 2; |
| 8071 | } |
| 8072 | // State of primary user's encryption storage at the moment boot completed. Always set. |
| 8073 | optional UserEncryptionState user_encryption_state = 3; |
| 8074 | } |