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"; |
Tej Singh | c477d9c | 2018-02-05 18:31:39 -0800 | [diff] [blame] | 56 | import "frameworks/base/core/proto/android/telecomm/enums.proto"; |
Bookatz | 1a1b046 | 2018-01-12 11:47:03 -0800 | [diff] [blame] | 57 | import "frameworks/base/core/proto/android/telephony/enums.proto"; |
| 58 | import "frameworks/base/core/proto/android/view/enums.proto"; |
Bookatz | 11257ca | 2018-12-05 18:22:39 -0800 | [diff] [blame] | 59 | import "frameworks/base/core/proto/android/wifi/enums.proto"; |
Tony Mak | e2b1b67 | 2019-07-29 16:59:47 +0100 | [diff] [blame] | 60 | import "frameworks/base/core/proto/android/stats/textclassifier/textclassifier_enums.proto"; |
Tianjie Xu | 167c3db | 2019-07-22 14:25:14 -0700 | [diff] [blame] | 61 | import "frameworks/base/core/proto/android/stats/otaupdate/updateengine_enums.proto"; |
Joe Onorato | 62c220b | 2017-11-18 20:32:56 -0800 | [diff] [blame] | 62 | |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 63 | /** |
Stefan Lafon | ae2df01 | 2017-11-14 09:17:21 -0800 | [diff] [blame] | 64 | * The master atom class. This message defines all of the available |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 65 | * raw stats log events from the Android system, also known as "atoms." |
| 66 | * |
| 67 | * This field contains a single oneof with all of the available messages. |
| 68 | * The stats-log-api-gen tool runs as part of the Android build and |
| 69 | * generates the android.util.StatsLog class, which contains the constants |
| 70 | * and methods that Android uses to log. |
| 71 | * |
Stefan Lafon | ae2df01 | 2017-11-14 09:17:21 -0800 | [diff] [blame] | 72 | * This Atom class is not actually built into the Android system. |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 73 | * Instead, statsd on Android constructs these messages synthetically, |
| 74 | * in the format defined here and in stats_log.proto. |
| 75 | */ |
Stefan Lafon | ae2df01 | 2017-11-14 09:17:21 -0800 | [diff] [blame] | 76 | message Atom { |
| 77 | // Pushed atoms start at 2. |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 78 | oneof pushed { |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 79 | // For StatsLog reasons, 1 is illegal and will not work. Must start at 2. |
| 80 | BleScanStateChanged ble_scan_state_changed = 2; |
Chenjie Yu | bd1a28f | 2018-07-17 14:55:19 -0700 | [diff] [blame] | 81 | ProcessStateChanged process_state_changed = 3; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 82 | BleScanResultReceived ble_scan_result_received = 4; |
| 83 | SensorStateChanged sensor_state_changed = 5; |
Bookatz | db026a2 | 2018-01-10 19:01:56 -0800 | [diff] [blame] | 84 | GpsScanStateChanged gps_scan_state_changed = 6; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 85 | SyncStateChanged sync_state_changed = 7; |
| 86 | ScheduledJobStateChanged scheduled_job_state_changed = 8; |
| 87 | ScreenBrightnessChanged screen_brightness_changed = 9; |
Bookatz | d674624 | 2017-10-24 18:39:35 -0700 | [diff] [blame] | 88 | WakelockStateChanged wakelock_state_changed = 10; |
Bookatz | ddccf0a | 2017-11-28 16:48:14 -0800 | [diff] [blame] | 89 | LongPartialWakelockStateChanged long_partial_wakelock_state_changed = 11; |
| 90 | MobileRadioPowerStateChanged mobile_radio_power_state_changed = 12; |
| 91 | WifiRadioPowerStateChanged wifi_radio_power_state_changed = 13; |
Chenjie Yu | bd1a28f | 2018-07-17 14:55:19 -0700 | [diff] [blame] | 92 | ActivityManagerSleepStateChanged activity_manager_sleep_state_changed = 14; |
| 93 | MemoryFactorStateChanged memory_factor_state_changed = 15; |
| 94 | ExcessiveCpuUsageReported excessive_cpu_usage_reported = 16; |
| 95 | CachedKillReported cached_kill_reported = 17; |
| 96 | ProcessMemoryStatReported process_memory_stat_reported = 18; |
Hyunyoung Song | c6d6b77 | 2018-10-17 13:35:32 -0700 | [diff] [blame] | 97 | LauncherUIChanged launcher_event = 19; |
Bookatz | ddccf0a | 2017-11-28 16:48:14 -0800 | [diff] [blame] | 98 | BatterySaverModeStateChanged battery_saver_mode_state_changed = 20; |
| 99 | DeviceIdleModeStateChanged device_idle_mode_state_changed = 21; |
| 100 | DeviceIdlingModeStateChanged device_idling_mode_state_changed = 22; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 101 | AudioStateChanged audio_state_changed = 23; |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 102 | MediaCodecStateChanged media_codec_state_changed = 24; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 103 | CameraStateChanged camera_state_changed = 25; |
| 104 | FlashlightStateChanged flashlight_state_changed = 26; |
| 105 | UidProcessStateChanged uid_process_state_changed = 27; |
| 106 | ProcessLifeCycleStateChanged process_life_cycle_state_changed = 28; |
| 107 | ScreenStateChanged screen_state_changed = 29; |
Bookatz | 8c6571b | 2017-10-24 15:04:41 -0700 | [diff] [blame] | 108 | BatteryLevelChanged battery_level_changed = 30; |
| 109 | ChargingStateChanged charging_state_changed = 31; |
| 110 | PluggedStateChanged plugged_state_changed = 32; |
Bookatz | a66083f | 2018-09-20 17:24:00 -0700 | [diff] [blame] | 111 | InteractiveStateChanged interactive_state_changed = 33; |
Siarhei Vishniakou | 3ddecff | 2018-11-08 19:57:13 -0800 | [diff] [blame] | 112 | TouchEventReported touch_event_reported = 34; |
Bookatz | 8c6571b | 2017-10-24 15:04:41 -0700 | [diff] [blame] | 113 | WakeupAlarmOccurred wakeup_alarm_occurred = 35; |
| 114 | KernelWakeupReported kernel_wakeup_reported = 36; |
Muhammad Qureshi | bcf6606 | 2019-12-23 17:55:48 -0800 | [diff] [blame] | 115 | WifiLockStateChanged wifi_lock_state_changed = 37 [(module) = "wifi"]; |
| 116 | WifiSignalStrengthChanged wifi_signal_strength_changed = 38 [(module) = "wifi"]; |
| 117 | WifiScanStateChanged wifi_scan_state_changed = 39 [(module) = "wifi"]; |
Bookatz | e588524 | 2017-10-24 20:10:31 -0700 | [diff] [blame] | 118 | PhoneSignalStrengthChanged phone_signal_strength_changed = 40; |
David Chen | c28b2bb | 2017-10-24 12:52:52 -0700 | [diff] [blame] | 119 | SettingChanged setting_changed = 41; |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 120 | ActivityForegroundStateChanged activity_foreground_state_changed = 42; |
David Chen | 2158296 | 2017-11-01 17:32:46 -0700 | [diff] [blame] | 121 | IsolatedUidChanged isolated_uid_changed = 43; |
Hugo Benichi | 884970e | 2017-11-14 22:42:46 +0900 | [diff] [blame] | 122 | PacketWakeupOccurred packet_wakeup_occurred = 44; |
Bookatz | 7948c87 | 2018-09-04 12:58:33 -0700 | [diff] [blame] | 123 | WallClockTimeShifted wall_clock_time_shifted = 45; |
Bookatz | 8fcd09a | 2017-12-18 13:01:10 -0800 | [diff] [blame] | 124 | AnomalyDetected anomaly_detected = 46; |
Andrei Onea | da01ea5 | 2019-01-30 15:28:36 +0000 | [diff] [blame] | 125 | AppBreadcrumbReported app_breadcrumb_reported = 47 [(allow_from_any_uid) = true]; |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 126 | AppStartOccurred app_start_occurred = 48; |
| 127 | AppStartCanceled app_start_canceled = 49; |
| 128 | AppStartFullyDrawn app_start_fully_drawn = 50; |
Rajeev Kumar | 8a9fa05 | 2018-01-25 19:03:09 -0800 | [diff] [blame] | 129 | LmkKillOccurred lmk_kill_occurred = 51; |
Chenjie Yu | 52cacc6 | 2017-12-08 18:11:45 -0800 | [diff] [blame] | 130 | PictureInPictureStateChanged picture_in_picture_state_changed = 52; |
Muhammad Qureshi | bcf6606 | 2019-12-23 17:55:48 -0800 | [diff] [blame] | 131 | WifiMulticastLockStateChanged wifi_multicast_lock_state_changed = 53 [(module) = "wifi"]; |
Rajeev Kumar | 8a9fa05 | 2018-01-25 19:03:09 -0800 | [diff] [blame] | 132 | LmkStateChanged lmk_state_changed = 54; |
| 133 | AppStartMemoryStateCaptured app_start_memory_state_captured = 55; |
Tej Singh | 1ea4289 | 2018-01-19 09:27:00 -0800 | [diff] [blame] | 134 | ShutdownSequenceReported shutdown_sequence_reported = 56; |
Tej Singh | 6483ea4 | 2018-01-25 17:45:49 -0800 | [diff] [blame] | 135 | BootSequenceReported boot_sequence_reported = 57; |
Andrei Onea | da01ea5 | 2019-01-30 15:28:36 +0000 | [diff] [blame] | 136 | DaveyOccurred davey_occurred = 58 [(allow_from_any_uid) = true]; |
Chenjie Yu | e890419 | 2017-12-08 19:12:57 -0800 | [diff] [blame] | 137 | OverlayStateChanged overlay_state_changed = 59; |
Chenjie Yu | ccfe645 | 2018-01-30 11:33:21 -0800 | [diff] [blame] | 138 | ForegroundServiceStateChanged foreground_service_state_changed = 60; |
Tej Singh | c477d9c | 2018-02-05 18:31:39 -0800 | [diff] [blame] | 139 | CallStateChanged call_state_changed = 61; |
Tej Singh | dd7bd35 | 2018-02-09 19:33:15 -0800 | [diff] [blame] | 140 | KeyguardStateChanged keyguard_state_changed = 62; |
| 141 | KeyguardBouncerStateChanged keyguard_bouncer_state_changed = 63; |
| 142 | KeyguardBouncerPasswordEntered keyguard_bouncer_password_entered = 64; |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 143 | AppDied app_died = 65; |
Tej Singh | a883b37 | 2018-02-15 11:30:01 -0800 | [diff] [blame] | 144 | ResourceConfigurationChanged resource_configuration_changed = 66; |
Tej Singh | 5d991e1 | 2018-03-09 19:48:11 -0800 | [diff] [blame] | 145 | BluetoothEnabledStateChanged bluetooth_enabled_state_changed = 67; |
| 146 | BluetoothConnectionStateChanged bluetooth_connection_state_changed = 68; |
Bookatz | 48d362e | 2018-11-06 15:49:08 -0800 | [diff] [blame] | 147 | GpsSignalQualityChanged gps_signal_quality_changed = 69; |
Andrew Chant | b56388b | 2018-03-22 21:07:33 -0700 | [diff] [blame] | 148 | UsbConnectorStateChanged usb_connector_state_changed = 70; |
Andrew Chant | 28d627e | 2018-02-22 15:17:05 -0800 | [diff] [blame] | 149 | SpeakerImpedanceReported speaker_impedance_reported = 71; |
| 150 | HardwareFailed hardware_failed = 72; |
| 151 | PhysicalDropDetected physical_drop_detected = 73; |
| 152 | ChargeCyclesReported charge_cycles_reported = 74; |
Tej Singh | eee317b | 2018-03-07 19:28:05 -0800 | [diff] [blame] | 153 | MobileConnectionStateChanged mobile_connection_state_changed = 75; |
| 154 | MobileRadioTechnologyChanged mobile_radio_technology_changed = 76; |
Andrew Chant | b56388b | 2018-03-22 21:07:33 -0700 | [diff] [blame] | 155 | UsbDeviceAttached usb_device_attached = 77; |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 156 | AppCrashOccurred app_crash_occurred = 78; |
| 157 | ANROccurred anr_occurred = 79; |
| 158 | WTFOccurred wtf_occurred = 80; |
| 159 | LowMemReported low_mem_reported = 81; |
Howard Ro | cb767f6 | 2018-06-19 19:58:05 -0700 | [diff] [blame] | 160 | GenericAtom generic_atom = 82; |
jianjin | 6eada30 | 2019-02-28 11:25:57 -0800 | [diff] [blame] | 161 | KeyValuePairsAtom key_value_pairs_atom = 83 [(allow_from_any_uid) = true]; |
Bookatz | a7020bd | 2018-08-28 16:29:35 -0700 | [diff] [blame] | 162 | VibratorStateChanged vibrator_state_changed = 84; |
Yangster-mac | 9635300 | 2018-09-05 11:18:55 -0700 | [diff] [blame] | 163 | DeferredJobStatsReported deferred_job_stats_reported = 85; |
Tej Singh | a7234499 | 2019-04-17 18:55:08 -0700 | [diff] [blame] | 164 | ThermalThrottlingStateChanged thermal_throttling = 86 [deprecated=true]; |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 165 | BiometricAcquired biometric_acquired = 87; |
| 166 | BiometricAuthenticated biometric_authenticated = 88; |
| 167 | BiometricErrorOccurred biometric_error_occurred = 89; |
Will Brockman | fbaa791 | 2019-10-24 15:15:09 -0400 | [diff] [blame] | 168 | UiEventReported ui_event_reported = 90; |
Howard Ro | a46b658 | 2018-09-18 16:45:02 -0700 | [diff] [blame] | 169 | BatteryHealthSnapshot battery_health_snapshot = 91; |
| 170 | SlowIo slow_io = 92; |
| 171 | BatteryCausedShutdown battery_caused_shutdown = 93; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 172 | PhoneServiceStateChanged phone_service_state_changed = 94; |
| 173 | PhoneStateChanged phone_state_changed = 95; |
arangelov | d5db50e | 2018-10-12 20:24:39 +0100 | [diff] [blame] | 174 | UserRestrictionChanged user_restriction_changed = 96; |
Fan Zhang | 916c13b | 2018-10-16 22:49:45 -0700 | [diff] [blame] | 175 | SettingsUIChanged settings_ui_changed = 97; |
Chenjie Yu | ae9dfac | 2018-10-25 16:06:56 -0700 | [diff] [blame] | 176 | ConnectivityStateChanged connectivity_state_changed = 98; |
Chenjie Yu | 75b3c49 | 2018-10-06 21:45:19 -0700 | [diff] [blame] | 177 | // TODO: service state change is very noisy shortly after boot, as well |
| 178 | // as at other transitions - coming out of doze, device plugged in, etc. |
| 179 | // Consider removing this if it becomes a problem |
| 180 | ServiceStateChanged service_state_changed = 99; |
| 181 | ServiceLaunchReported service_launch_reported = 100; |
Tej Singh | 0d17695 | 2019-01-16 19:10:54 -0800 | [diff] [blame] | 182 | FlagFlipUpdateOccurred flag_flip_update_occurred = 101; |
Yangster-mac | b89807e | 2018-11-15 21:10:57 -0800 | [diff] [blame] | 183 | BinaryPushStateChanged binary_push_state_changed = 102; |
arangelov | 4e99406 | 2018-11-13 16:12:38 +0000 | [diff] [blame] | 184 | DevicePolicyEvent device_policy_event = 103; |
Muhammad Qureshi | bcf6606 | 2019-12-23 17:55:48 -0800 | [diff] [blame] | 185 | DocsUIFileOperationCanceledReported docs_ui_file_op_canceled = 104 [(module) = "docsui"]; |
| 186 | DocsUIFileOperationCopyMoveModeReported docs_ui_file_op_copy_move_mode_reported = |
| 187 | 105 [(module) = "docsui"]; |
| 188 | DocsUIFileOperationFailureReported docs_ui_file_op_failure = 106 [(module) = "docsui"]; |
| 189 | DocsUIFileOperationReported docs_ui_provider_file_op = 107 [(module) = "docsui"]; |
| 190 | DocsUIInvalidScopedAccessRequestReported docs_ui_invalid_scoped_access_request = |
| 191 | 108 [(module) = "docsui"]; |
| 192 | DocsUILaunchReported docs_ui_launch_reported = 109 [(module) = "docsui"]; |
| 193 | DocsUIRootVisitedReported docs_ui_root_visited = 110 [(module) = "docsui"]; |
| 194 | DocsUIStartupMsReported docs_ui_startup_ms = 111 [(module) = "docsui"]; |
| 195 | DocsUIUserActionReported docs_ui_user_action_reported = 112 [(module) = "docsui"]; |
Bookatz | da1798c | 2018-12-13 14:16:00 -0800 | [diff] [blame] | 196 | WifiEnabledStateChanged wifi_enabled_state_changed = 113; |
| 197 | WifiRunningStateChanged wifi_running_state_changed = 114; |
Ben Murdoch | bab399f6 | 2018-12-06 11:01:38 +0000 | [diff] [blame] | 198 | AppCompacted app_compacted = 115; |
Muhammad Qureshi | bcf6606 | 2019-12-23 17:55:48 -0800 | [diff] [blame] | 199 | NetworkDnsEventReported network_dns_event_reported = 116 [(module) = "resolv"]; |
shawnlin | 9a1392a | 2019-04-09 16:21:17 +0800 | [diff] [blame] | 200 | DocsUIPickerLaunchedFromReported docs_ui_picker_launched_from_reported = |
Muhammad Qureshi | bcf6606 | 2019-12-23 17:55:48 -0800 | [diff] [blame] | 201 | 117 [(module) = "docsui"]; |
| 202 | DocsUIPickResultReported docs_ui_pick_result_reported = 118 [(module) = "docsui"]; |
| 203 | DocsUISearchModeReported docs_ui_search_mode_reported = 119 [(module) = "docsui"]; |
| 204 | DocsUISearchTypeReported docs_ui_search_type_reported = 120 [(module) = "docsui"]; |
| 205 | DataStallEvent data_stall_event = 121 [(module) = "network_stack"]; |
Christian Brunschen | f86039e | 2018-12-21 12:26:14 +0000 | [diff] [blame] | 206 | RescuePartyResetReported rescue_party_reset_reported = 122; |
Mathew Inwood | b375be5 | 2019-01-04 11:36:25 +0000 | [diff] [blame] | 207 | SignedConfigReported signed_config_reported = 123; |
Yu-Han Yang | 8a1b51d | 2018-12-26 22:18:31 -0800 | [diff] [blame] | 208 | GnssNiEventReported gnss_ni_event_reported = 124; |
Jack He | ab86dbd2 | 2018-12-18 15:43:27 -0800 | [diff] [blame] | 209 | BluetoothLinkLayerConnectionEvent bluetooth_link_layer_connection_event = 125; |
Jack He | d9837c8 | 2019-01-09 01:19:13 -0800 | [diff] [blame] | 210 | BluetoothAclConnectionStateChanged bluetooth_acl_connection_state_changed = 126; |
| 211 | BluetoothScoConnectionStateChanged bluetooth_sco_connection_state_changed = 127; |
Felix Lopez Luis | d95346a | 2018-12-12 10:32:32 +0000 | [diff] [blame] | 212 | AppDowngraded app_downgraded = 128; |
| 213 | AppOptimizedAfterDowngraded app_optimized_after_downgraded = 129; |
| 214 | LowStorageStateChanged low_storage_state_changed = 130; |
Yu-Han Yang | 14d5fb4 | 2019-01-16 12:42:59 -0800 | [diff] [blame] | 215 | GnssNfwNotificationReported gnss_nfw_notification_reported = 131; |
| 216 | GnssConfigurationReported gnss_configuration_reported = 132; |
Maggie White | fc1aa59 | 2018-11-28 21:55:23 -0800 | [diff] [blame] | 217 | UsbPortOverheatEvent usb_port_overheat_event_reported = 133; |
Jack Yu | 95b64f3 | 2018-12-13 18:26:11 +0800 | [diff] [blame] | 218 | NfcErrorOccurred nfc_error_occurred = 134; |
| 219 | NfcStateChanged nfc_state_changed = 135; |
| 220 | NfcBeamOccurred nfc_beam_occurred = 136; |
| 221 | NfcCardemulationOccurred nfc_cardemulation_occurred = 137; |
| 222 | NfcTagOccurred nfc_tag_occurred = 138; |
| 223 | NfcHceTransactionOccurred nfc_hce_transaction_occurred = 139; |
| 224 | SeStateChanged se_state_changed = 140; |
| 225 | SeOmapiReported se_omapi_reported = 141; |
Ng Zhi An | 7ff7fdb | 2019-01-16 15:35:51 -0800 | [diff] [blame] | 226 | BroadcastDispatchLatencyReported broadcast_dispatch_latency_reported = 142; |
Alex Salo | a060aee | 2019-01-21 14:36:41 -0800 | [diff] [blame] | 227 | AttentionManagerServiceResultReported attention_manager_service_result_reported = 143; |
Michael Groover | 9e7b06e | 2018-12-28 19:55:51 -0800 | [diff] [blame] | 228 | AdbConnectionChanged adb_connection_changed = 144; |
Carter Hsu | b8fd1e9 | 2019-01-11 15:24:45 +0800 | [diff] [blame] | 229 | SpeechDspStatReported speech_dsp_stat_reported = 145; |
Badhri Jagan Sridharan | 129c729 | 2019-01-14 21:18:25 -0800 | [diff] [blame] | 230 | UsbContaminantReported usb_contaminant_reported = 146; |
Howard Ro | e103fe2 | 2019-01-17 16:52:16 -0800 | [diff] [blame] | 231 | WatchdogRollbackOccurred watchdog_rollback_occurred = 147; |
Kevin Chyn | e5a37fb | 2019-02-08 13:10:36 -0800 | [diff] [blame] | 232 | BiometricSystemHealthIssueDetected biometric_system_health_issue_detected = 148; |
Steven Wu | acef6bb | 2019-01-23 14:21:17 -0500 | [diff] [blame] | 233 | BubbleUIChanged bubble_ui_changed = 149; |
Kweku Adams | 8845d01 | 2018-12-11 20:06:45 -0800 | [diff] [blame] | 234 | ScheduledJobConstraintChanged scheduled_job_constraint_changed = 150; |
Jack He | c27040a | 2019-01-09 20:54:41 -0800 | [diff] [blame] | 235 | BluetoothActiveDeviceChanged bluetooth_active_device_changed = 151; |
| 236 | BluetoothA2dpPlaybackStateChanged bluetooth_a2dp_playback_state_changed = 152; |
| 237 | BluetoothA2dpCodecConfigChanged bluetooth_a2dp_codec_config_changed = 153; |
| 238 | BluetoothA2dpCodecCapabilityChanged bluetooth_a2dp_codec_capability_changed = 154; |
| 239 | BluetoothA2dpAudioUnderrunReported bluetooth_a2dp_audio_underrun_reported = 155; |
| 240 | BluetoothA2dpAudioOverrunReported bluetooth_a2dp_audio_overrun_reported = 156; |
| 241 | BluetoothDeviceRssiReported bluetooth_device_rssi_reported = 157; |
| 242 | BluetoothDeviceFailedContactCounterReported bluetooth_device_failed_contact_counter_reported = 158; |
| 243 | BluetoothDeviceTxPowerLevelReported bluetooth_device_tx_power_level_reported = 159; |
Jack He | 1021a61 | 2019-01-20 21:22:46 -0800 | [diff] [blame] | 244 | BluetoothHciTimeoutReported bluetooth_hci_timeout_reported = 160; |
| 245 | BluetoothQualityReportReported bluetooth_quality_report_reported = 161; |
Jack He | aea2698 | 2019-04-04 11:19:48 -0700 | [diff] [blame] | 246 | BluetoothDeviceInfoReported bluetooth_device_info_reported = 162; |
Jack He | 1021a61 | 2019-01-20 21:22:46 -0800 | [diff] [blame] | 247 | BluetoothRemoteVersionInfoReported bluetooth_remote_version_info_reported = 163; |
| 248 | BluetoothSdpAttributeReported bluetooth_sdp_attribute_reported = 164; |
| 249 | BluetoothBondStateChanged bluetooth_bond_state_changed = 165; |
| 250 | BluetoothClassicPairingEventReported bluetooth_classic_pairing_event_reported = 166; |
| 251 | BluetoothSmpPairingEventReported bluetooth_smp_pairing_event_reported = 167; |
Alex Salo | d7c3eef | 2019-01-25 14:43:27 -0800 | [diff] [blame] | 252 | ScreenTimeoutExtensionReported screen_timeout_extension_reported = 168; |
Hui Yu | 885aca1 | 2019-01-10 17:11:34 -0800 | [diff] [blame] | 253 | ProcessStartTime process_start_time = 169; |
Philip P. Moltmann | b2f0c77 | 2019-04-11 14:41:21 -0700 | [diff] [blame] | 254 | PermissionGrantRequestResultReported permission_grant_request_result_reported = |
Muhammad Qureshi | bcf6606 | 2019-12-23 17:55:48 -0800 | [diff] [blame] | 255 | 170 [(module) = "permissioncontroller"]; |
Jack He | 815cdba | 2019-01-30 17:24:55 -0800 | [diff] [blame] | 256 | BluetoothSocketConnectionStateChanged bluetooth_socket_connection_state_changed = 171; |
Michael Groover | 4a0ca94 | 2019-01-24 17:41:25 -0800 | [diff] [blame] | 257 | DeviceIdentifierAccessDenied device_identifier_access_denied = 172; |
Steven Wu | 552f63f | 2019-02-05 13:41:36 -0500 | [diff] [blame] | 258 | BubbleDeveloperErrorReported bubble_developer_error_reported = 173; |
joshmccloskey | 8c3322e | 2019-01-09 18:25:57 -0800 | [diff] [blame] | 259 | AssistGestureStageReported assist_gesture_stage_reported = 174; |
| 260 | AssistGestureFeedbackReported assist_gesture_feedback_reported = 175; |
| 261 | AssistGestureProgressReported assist_gesture_progress_reported = 176; |
Philip Quinn | 0eded62 | 2019-01-29 12:46:28 -0800 | [diff] [blame] | 262 | TouchGestureClassified touch_gesture_classified = 177; |
Andrei Onea | 4ad6d0c | 2019-02-08 13:54:12 +0000 | [diff] [blame] | 263 | HiddenApiUsed hidden_api_used = 178 [(allow_from_any_uid) = true]; |
Muhammad Qureshi | bcf6606 | 2019-12-23 17:55:48 -0800 | [diff] [blame] | 264 | StyleUIChanged style_ui_changed = 179 [(module) = "style"]; |
Joel Galenson | 6f41b106 | 2019-04-16 12:22:41 -0700 | [diff] [blame] | 265 | PrivacyIndicatorsInteracted privacy_indicators_interacted = |
Muhammad Qureshi | bcf6606 | 2019-12-23 17:55:48 -0800 | [diff] [blame] | 266 | 180 [(module) = "permissioncontroller"]; |
Carmen Agimof | 6688a35 | 2019-01-30 19:36:04 +0000 | [diff] [blame] | 267 | AppInstallOnExternalStorageReported app_install_on_external_storage_reported = 181; |
Muhammad Qureshi | bcf6606 | 2019-12-23 17:55:48 -0800 | [diff] [blame] | 268 | NetworkStackReported network_stack_reported = 182 [(module) = "network_stack"]; |
Carmen Agimof | 6dcc503 | 2019-03-01 16:20:09 +0000 | [diff] [blame] | 269 | AppMovedStorageReported app_moved_storage_reported = 183; |
joshmccloskey | 6f952b2 | 2019-03-25 20:59:35 -0700 | [diff] [blame] | 270 | BiometricEnrolled biometric_enrolled = 184; |
jianjin | 8f2dee0 | 2019-03-29 14:03:08 -0700 | [diff] [blame] | 271 | SystemServerWatchdogOccurred system_server_watchdog_occurred = 185; |
| 272 | TombStoneOccurred tomb_stone_occurred = 186; |
Jack He | 7142680 | 2019-04-02 13:32:52 -0700 | [diff] [blame] | 273 | BluetoothClassOfDeviceReported bluetooth_class_of_device_reported = 187; |
Ben Blount | 763a5d5 | 2019-04-10 11:48:58 -0700 | [diff] [blame] | 274 | IntelligenceEventReported intelligence_event_reported = |
Muhammad Qureshi | bcf6606 | 2019-12-23 17:55:48 -0800 | [diff] [blame] | 275 | 188 [(module) = "intelligence"]; |
Tej Singh | a7234499 | 2019-04-17 18:55:08 -0700 | [diff] [blame] | 276 | ThermalThrottlingSeverityStateChanged thermal_throttling_severity_state_changed = 189; |
Hai Zhang | 5d3328d | 2019-04-13 21:25:06 +0800 | [diff] [blame] | 277 | RoleRequestResultReported role_request_result_reported = |
Muhammad Qureshi | bcf6606 | 2019-12-23 17:55:48 -0800 | [diff] [blame] | 278 | 190 [(module) = "permissioncontroller"]; |
Ray Essick | 8ab04df | 2019-02-15 11:01:02 -0800 | [diff] [blame] | 279 | MediametricsAudiopolicyReported mediametrics_audiopolicy_reported = 191; |
| 280 | MediametricsAudiorecordReported mediametrics_audiorecord_reported = 192; |
| 281 | MediametricsAudiothreadReported mediametrics_audiothread_reported = 193; |
| 282 | MediametricsAudiotrackReported mediametrics_audiotrack_reported = 194; |
| 283 | MediametricsCodecReported mediametrics_codec_reported = 195; |
| 284 | MediametricsDrmWidevineReported mediametrics_drm_widevine_reported = 196; |
| 285 | MediametricsExtractorReported mediametrics_extractor_reported = 197; |
| 286 | MediametricsMediadrmReported mediametrics_mediadrm_reported = 198; |
| 287 | MediametricsNuPlayerReported mediametrics_nuplayer_reported = 199; |
| 288 | MediametricsRecorderReported mediametrics_recorder_reported = 200; |
Robert Shih | a4beed3 | 2019-08-19 14:15:23 -0700 | [diff] [blame] | 289 | MediametricsDrmManagerReported mediametrics_drmmanager_reported = 201; |
Yuncheol Heo | d1a85d2 | 2019-05-08 17:13:42 -0700 | [diff] [blame] | 290 | CarPowerStateChanged car_power_state_changed = 203; |
| 291 | GarageModeInfo garage_mode_info = 204; |
Muhammad Qureshi | bcf6606 | 2019-12-23 17:55:48 -0800 | [diff] [blame] | 292 | TestAtomReported test_atom_reported = 205 [(module) = "cts"]; |
Adam He | 420947c | 2019-01-23 15:59:09 -0800 | [diff] [blame] | 293 | ContentCaptureCallerMismatchReported content_capture_caller_mismatch_reported = 206; |
| 294 | ContentCaptureServiceEvents content_capture_service_events = 207; |
| 295 | ContentCaptureSessionEvents content_capture_session_events = 208; |
| 296 | ContentCaptureFlushed content_capture_flushed = 209; |
Hongyi Zhang | 700137e | 2019-05-23 21:19:36 -0700 | [diff] [blame] | 297 | LocationManagerApiUsageReported location_manager_api_usage_reported = 210; |
Stanislav Zholnin | bdf620b | 2019-06-06 22:38:33 +0100 | [diff] [blame] | 298 | ReviewPermissionsFragmentResultReported review_permissions_fragment_result_reported = |
Muhammad Qureshi | bcf6606 | 2019-12-23 17:55:48 -0800 | [diff] [blame] | 299 | 211 [(module) = "permissioncontroller"]; |
Stanislav Zholnin | 247d1b7 | 2019-06-06 21:28:44 +0100 | [diff] [blame] | 300 | RuntimePermissionsUpgradeResult runtime_permissions_upgrade_result = |
Muhammad Qureshi | bcf6606 | 2019-12-23 17:55:48 -0800 | [diff] [blame] | 301 | 212 [(module) = "permissioncontroller"]; |
Stanislav Zholnin | bdf620b | 2019-06-06 22:38:33 +0100 | [diff] [blame] | 302 | GrantPermissionsActivityButtonActions grant_permissions_activity_button_actions = |
Muhammad Qureshi | bcf6606 | 2019-12-23 17:55:48 -0800 | [diff] [blame] | 303 | 213 [(module) = "permissioncontroller"]; |
Stanislav Zholnin | 375e2ab | 2019-05-29 13:07:35 +0100 | [diff] [blame] | 304 | LocationAccessCheckNotificationAction location_access_check_notification_action = |
Muhammad Qureshi | bcf6606 | 2019-12-23 17:55:48 -0800 | [diff] [blame] | 305 | 214 [(module) = "permissioncontroller"]; |
Stanislav Zholnin | 3e0f9bc | 2019-05-23 19:03:55 +0100 | [diff] [blame] | 306 | AppPermissionFragmentActionReported app_permission_fragment_action_reported = |
Muhammad Qureshi | bcf6606 | 2019-12-23 17:55:48 -0800 | [diff] [blame] | 307 | 215 [(module) = "permissioncontroller"]; |
Stanislav Zholnin | c9dda9e | 2019-06-02 20:50:13 +0100 | [diff] [blame] | 308 | AppPermissionFragmentViewed app_permission_fragment_viewed = |
Muhammad Qureshi | bcf6606 | 2019-12-23 17:55:48 -0800 | [diff] [blame] | 309 | 216 [(module) = "permissioncontroller"]; |
Stanislav Zholnin | dc3e2b3 | 2019-06-06 18:10:14 +0100 | [diff] [blame] | 310 | AppPermissionsFragmentViewed app_permissions_fragment_viewed = |
Muhammad Qureshi | bcf6606 | 2019-12-23 17:55:48 -0800 | [diff] [blame] | 311 | 217 [(module) = "permissioncontroller"]; |
Stanislav Zholnin | 32a89c1 | 2019-06-04 14:59:21 +0100 | [diff] [blame] | 312 | PermissionAppsFragmentViewed permission_apps_fragment_viewed = |
Muhammad Qureshi | bcf6606 | 2019-12-23 17:55:48 -0800 | [diff] [blame] | 313 | 218 [(module) = "permissioncontroller"]; |
| 314 | TextSelectionEvent text_selection_event = 219 [(module) = "textclassifier"]; |
| 315 | TextLinkifyEvent text_linkify_event = 220 [(module) = "textclassifier"]; |
| 316 | ConversationActionsEvent conversation_actions_event = 221 [(module) = "textclassifier"]; |
| 317 | LanguageDetectionEvent language_detection_event = 222 [(module) = "textclassifier"]; |
Hyunyoung Song | 2ecb886 | 2019-07-09 09:19:25 -0700 | [diff] [blame] | 318 | ExclusionRectStateChanged exclusion_rect_state_changed = 223; |
| 319 | BackGesture back_gesture_reported_reported = 224; |
Tianjie Xu | 167c3db | 2019-07-22 14:25:14 -0700 | [diff] [blame] | 320 | UpdateEngineUpdateAttemptReported update_engine_update_attempt_reported = 225; |
| 321 | UpdateEngineSuccessfulUpdateReported update_engine_successful_update_reported = 226; |
Emilian Peev | 6729f37 | 2019-08-29 09:14:09 -0700 | [diff] [blame] | 322 | CameraActionEvent camera_action_event = 227; |
atrost | 01a2093 | 2019-08-28 15:40:37 +0100 | [diff] [blame] | 323 | AppCompatibilityChangeReported app_compatibility_change_reported = |
| 324 | 228 [(allow_from_any_uid) = true]; |
Muhammad Qureshi | bcf6606 | 2019-12-23 17:55:48 -0800 | [diff] [blame] | 325 | PerfettoUploaded perfetto_uploaded = 229 [(module) = "perfetto"]; |
Mark Tabry | a824a64 | 2019-11-05 12:26:12 -0800 | [diff] [blame] | 326 | VmsClientConnectionStateChanged vms_client_connection_state_changed = 230; |
Blake Kragten | 212edc7 | 2019-10-15 13:26:50 -0700 | [diff] [blame] | 327 | GpsLocationStatusReported gps_location_status_reported = 231; |
| 328 | GpsTimeToFirstFixReported gps_time_to_first_fix_reported = 232; |
Muhammad Qureshi | bcf6606 | 2019-12-23 17:55:48 -0800 | [diff] [blame] | 329 | MediaProviderScanEvent media_provider_scan_event = 233 [(module) = "mediaprovider"]; |
| 330 | MediaProviderDeletionEvent media_provider_deletion_event = 234 [(module) = "mediaprovider"]; |
Jeff Sharkey | 6bd2157 | 2019-11-15 20:45:33 -0700 | [diff] [blame] | 331 | MediaProviderPermissionEvent media_provider_permission_event = |
Muhammad Qureshi | bcf6606 | 2019-12-23 17:55:48 -0800 | [diff] [blame] | 332 | 235 [(module) = "mediaprovider"]; |
| 333 | MediaProviderSchemaChange media_provider_schema_change = 236 [(module) = "mediaprovider"]; |
Jeff Sharkey | 6bd2157 | 2019-11-15 20:45:33 -0700 | [diff] [blame] | 334 | MediaProviderIdleMaintenance media_provider_idle_maintenance = |
Muhammad Qureshi | bcf6606 | 2019-12-23 17:55:48 -0800 | [diff] [blame] | 335 | 237 [(module) = "mediaprovider"]; |
Kenny Root | 4eacaaa | 2020-01-08 20:48:13 -0800 | [diff] [blame] | 336 | RebootEscrowRecoveryReported reboot_escrow_recovery_reported = 238; |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 337 | } |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 338 | |
David Chen | 6e3e6cb | 2018-01-03 16:14:06 -0800 | [diff] [blame] | 339 | // Pulled events will start at field 10000. |
Stan Iliev | 637ba5e | 2019-08-16 13:43:08 -0400 | [diff] [blame] | 340 | // Next: 10069 |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 341 | oneof pulled { |
David Chen | 6e3e6cb | 2018-01-03 16:14:06 -0800 | [diff] [blame] | 342 | WifiBytesTransfer wifi_bytes_transfer = 10000; |
| 343 | WifiBytesTransferByFgBg wifi_bytes_transfer_by_fg_bg = 10001; |
| 344 | MobileBytesTransfer mobile_bytes_transfer = 10002; |
| 345 | MobileBytesTransferByFgBg mobile_bytes_transfer_by_fg_bg = 10003; |
Chenjie Yu | 9d7720b | 2018-01-24 10:34:48 -0800 | [diff] [blame] | 346 | BluetoothBytesTransfer bluetooth_bytes_transfer = 10006; |
David Chen | 6e3e6cb | 2018-01-03 16:14:06 -0800 | [diff] [blame] | 347 | KernelWakelock kernel_wakelock = 10004; |
Chenjie Yu | c8b7f22 | 2018-01-11 23:25:57 -0800 | [diff] [blame] | 348 | SubsystemSleepState subsystem_sleep_state = 10005; |
David Chen | 6e3e6cb | 2018-01-03 16:14:06 -0800 | [diff] [blame] | 349 | CpuTimePerFreq cpu_time_per_freq = 10008; |
| 350 | CpuTimePerUid cpu_time_per_uid = 10009; |
| 351 | CpuTimePerUidFreq cpu_time_per_uid_freq = 10010; |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 352 | WifiActivityInfo wifi_activity_info = 10011; |
David Chen | 6e3e6cb | 2018-01-03 16:14:06 -0800 | [diff] [blame] | 353 | ModemActivityInfo modem_activity_info = 10012; |
Chenjie Yu | 9d7720b | 2018-01-24 10:34:48 -0800 | [diff] [blame] | 354 | BluetoothActivityInfo bluetooth_activity_info = 10007; |
Rajeev Kumar | 8a9fa05 | 2018-01-25 19:03:09 -0800 | [diff] [blame] | 355 | ProcessMemoryState process_memory_state = 10013; |
Chenjie Yu | 9d7720b | 2018-01-24 10:34:48 -0800 | [diff] [blame] | 356 | SystemElapsedRealtime system_elapsed_realtime = 10014; |
| 357 | SystemUptime system_uptime = 10015; |
Chenjie Yu | 9da105b | 2018-01-13 12:41:08 -0800 | [diff] [blame] | 358 | CpuActiveTime cpu_active_time = 10016; |
| 359 | CpuClusterTime cpu_cluster_time = 10017; |
Tej Singh | 86dc9db | 2018-09-06 00:39:57 +0000 | [diff] [blame] | 360 | DiskSpace disk_space = 10018 [deprecated=true]; |
Tej Singh | bf972d9 | 2018-01-10 20:51:13 -0800 | [diff] [blame] | 361 | RemainingBatteryCapacity remaining_battery_capacity = 10019; |
| 362 | FullBatteryCapacity full_battery_capacity = 10020; |
Tej Singh | 4029831 | 2018-02-16 00:15:09 -0800 | [diff] [blame] | 363 | Temperature temperature = 10021; |
Olivier Gaillard | 00bfb1b | 2018-07-10 11:25:09 +0100 | [diff] [blame] | 364 | BinderCalls binder_calls = 10022; |
Olivier Gaillard | 9ea238d | 2018-07-24 10:26:31 +0100 | [diff] [blame] | 365 | BinderCallsExceptions binder_calls_exceptions = 10023; |
Marcin Oczeretko | d8cc859 | 2018-08-22 16:07:36 +0100 | [diff] [blame] | 366 | LooperStats looper_stats = 10024; |
Tej Singh | 86dc9db | 2018-09-06 00:39:57 +0000 | [diff] [blame] | 367 | DiskStats disk_stats = 10025; |
| 368 | DirectoryUsage directory_usage = 10026; |
| 369 | AppSize app_size = 10027; |
| 370 | CategorySize category_size = 10028; |
Chenjie Yu | ab53020 | 2018-09-26 12:39:20 -0700 | [diff] [blame] | 371 | ProcStats proc_stats = 10029; |
Bookatz | 17f0d8a | 2018-09-13 12:56:32 -0700 | [diff] [blame] | 372 | BatteryVoltage battery_voltage = 10030; |
joshmccloskey | 5dcb408 | 2019-02-26 15:28:37 -0800 | [diff] [blame] | 373 | NumFingerprintsEnrolled num_fingerprints_enrolled = 10031; |
Tej Singh | e7726dc | 2018-09-21 11:42:12 -0700 | [diff] [blame] | 374 | DiskIo disk_io = 10032; |
Chenjie Yu | ab53020 | 2018-09-26 12:39:20 -0700 | [diff] [blame] | 375 | PowerProfile power_profile = 10033; |
Chenjie Yu | f910b780 | 2019-01-11 16:08:20 -0800 | [diff] [blame] | 376 | ProcStatsPkgProc proc_stats_pkg_proc = 10034; |
Yangster-mac | 308ea0c | 2018-10-22 13:10:25 -0700 | [diff] [blame] | 377 | ProcessCpuTime process_cpu_time = 10035; |
Misha Wagner | 5a51e00 | 2018-10-03 15:04:09 +0100 | [diff] [blame] | 378 | CpuTimePerThreadFreq cpu_time_per_thread_freq = 10037; |
Bookatz | 92da283 | 2018-11-01 18:10:03 -0700 | [diff] [blame] | 379 | OnDevicePowerMeasurement on_device_power_measurement = 10038; |
Bookatz | 75ee6042 | 2018-11-09 12:27:37 -0800 | [diff] [blame] | 380 | DeviceCalculatedPowerUse device_calculated_power_use = 10039; |
| 381 | DeviceCalculatedPowerBlameUid device_calculated_power_blame_uid = 10040; |
| 382 | DeviceCalculatedPowerBlameOther device_calculated_power_blame_other = 10041; |
Rafal Slawik | 3bea895 | 2018-11-15 12:39:33 +0000 | [diff] [blame] | 383 | ProcessMemoryHighWaterMark process_memory_high_water_mark = 10042; |
Tej Singh | b1dbc8b | 2018-11-19 15:49:47 -0800 | [diff] [blame] | 384 | BatteryLevel battery_level = 10043; |
Bookatz | 366a443 | 2018-11-20 09:42:33 -0800 | [diff] [blame] | 385 | BuildInformation build_information = 10044; |
Maggie White | 8735b85 | 2019-01-18 11:40:49 -0800 | [diff] [blame] | 386 | BatteryCycleCount battery_cycle_count = 10045; |
Olivier Gaillard | 18d45220 | 2019-01-22 15:03:41 +0000 | [diff] [blame] | 387 | DebugElapsedClock debug_elapsed_clock = 10046; |
| 388 | DebugFailingElapsedClock debug_failing_elapsed_clock = 10047; |
joshmccloskey | 5dcb408 | 2019-02-26 15:28:37 -0800 | [diff] [blame] | 389 | NumFacesEnrolled num_faces_enrolled = 10048; |
Philip P. Moltmann | 70b42ae | 2019-01-29 16:24:19 -0800 | [diff] [blame] | 390 | RoleHolder role_holder = 10049; |
Philip P. Moltmann | f21a350 | 2019-01-30 09:53:04 -0800 | [diff] [blame] | 391 | DangerousPermissionState dangerous_permission_state = 10050; |
Chenjie Yu | e13f44a | 2019-02-07 17:51:38 -0800 | [diff] [blame] | 392 | TrainInfo train_info = 10051; |
Neil Fuller | db14b48 | 2019-02-05 19:44:44 +0000 | [diff] [blame] | 393 | TimeZoneDataInfo time_zone_data_info = 10052; |
Carmen Agimof | 12dec12 | 2019-03-06 16:14:38 +0000 | [diff] [blame] | 394 | ExternalStorageInfo external_storage_info = 10053; |
Yiwei Zhang | 5c81b63 | 2019-03-01 15:39:46 -0800 | [diff] [blame] | 395 | GpuStatsGlobalInfo gpu_stats_global_info = 10054; |
| 396 | GpuStatsAppInfo gpu_stats_app_info = 10055; |
Rafal Slawik | d4e8757 | 2019-03-12 13:08:38 +0000 | [diff] [blame] | 397 | SystemIonHeapSize system_ion_heap_size = 10056; |
Carmen Agimof | a769c15 | 2019-03-04 14:39:14 +0000 | [diff] [blame] | 398 | AppsOnExternalStorageInfo apps_on_external_storage_info = 10057; |
joshmccloskey | 34c1f8e | 2019-04-11 14:06:43 -0700 | [diff] [blame] | 399 | FaceSettings face_settings = 10058; |
Maggie White | 442b631 | 2019-04-05 16:26:44 -0700 | [diff] [blame] | 400 | CoolingDevice cooling_device = 10059; |
Martijn Coenen | cd95d46 | 2019-04-25 17:09:45 +0200 | [diff] [blame] | 401 | AppOps app_ops = 10060; |
Rafal Slawik | 77987ed | 2019-06-17 12:28:23 +0100 | [diff] [blame] | 402 | ProcessSystemIonHeapSize process_system_ion_heap_size = 10061; |
Alec Mouri | e088e76 | 2019-07-02 13:10:55 -0700 | [diff] [blame] | 403 | SurfaceflingerStatsGlobalInfo surfaceflinger_stats_global_info = 10062; |
| 404 | SurfaceflingerStatsLayerInfo surfaceflinger_stats_layer_info = 10063; |
Rafal Slawik | 7efcefb | 2019-09-20 11:16:20 +0100 | [diff] [blame] | 405 | ProcessMemorySnapshot process_memory_snapshot = 10064; |
Mark Tabry | a824a64 | 2019-11-05 12:26:12 -0800 | [diff] [blame] | 406 | VmsClientStats vms_client_stats = 10065; |
Chris Wren | cdea3b7 | 2019-11-22 16:58:17 -0500 | [diff] [blame] | 407 | NotificationRemoteViews notification_remote_views = 10066; |
Stanislav Zholnin | ccb82e4 | 2019-11-29 18:59:49 +0000 | [diff] [blame] | 408 | DangerousPermissionStateSampled dangerous_permission_state_sampled = 10067; |
Stan Iliev | 637ba5e | 2019-08-16 13:43:08 -0400 | [diff] [blame] | 409 | GraphicsStats graphics_stats = 10068; |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 410 | } |
yro | a1fe77c | 2018-02-26 14:22:54 -0800 | [diff] [blame] | 411 | |
Bookatz | 76aafcf | 2018-09-17 16:17:10 -0700 | [diff] [blame] | 412 | // DO NOT USE field numbers above 100,000 in AOSP. |
| 413 | // Field numbers 100,000 - 199,999 are reserved for non-AOSP (e.g. OEMs) to use. |
| 414 | // 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] | 415 | |
| 416 | reserved 10036; |
Stefan Lafon | cdb1a0e | 2017-09-27 20:24:15 -0700 | [diff] [blame] | 417 | } |
| 418 | |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 419 | /** |
Yangster-mac | 2087716 | 2017-12-22 17:19:39 -0800 | [diff] [blame] | 420 | * This proto represents a node of an attribution chain. |
| 421 | * Note: All attribution chains are represented as a repeated field of type |
| 422 | * AttributionNode. It is understood that in such arrays, the order is that |
| 423 | * 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] | 424 | */ |
Yangster-mac | 2087716 | 2017-12-22 17:19:39 -0800 | [diff] [blame] | 425 | message AttributionNode { |
| 426 | // The uid for a given element in the attribution chain. |
Yangster-mac | 7604aea | 2017-12-11 22:55:49 -0800 | [diff] [blame] | 427 | optional int32 uid = 1; |
Yangster-mac | 7604aea | 2017-12-11 22:55:49 -0800 | [diff] [blame] | 428 | |
Yangster-mac | 2087716 | 2017-12-22 17:19:39 -0800 | [diff] [blame] | 429 | // The (optional) string tag for an element in the attribution chain. If the |
| 430 | // element has no tag, it is encoded as an empty string. |
| 431 | optional string tag = 2; |
Stefan Lafon | cdb1a0e | 2017-09-27 20:24:15 -0700 | [diff] [blame] | 432 | } |
| 433 | |
Yangster-mac | 48b3d62 | 2018-08-18 12:38:11 -0700 | [diff] [blame] | 434 | message KeyValuePair { |
| 435 | optional int32 key = 1; |
| 436 | oneof value { |
Howard Ro | 4078dd4 | 2018-09-27 17:41:08 -0700 | [diff] [blame] | 437 | int32 value_int = 2; |
| 438 | int64 value_long = 3; |
| 439 | string value_str = 4; |
| 440 | float value_float = 5; |
Yangster-mac | 48b3d62 | 2018-08-18 12:38:11 -0700 | [diff] [blame] | 441 | } |
| 442 | } |
| 443 | |
| 444 | message KeyValuePairsAtom { |
| 445 | optional int32 uid = 1; |
| 446 | repeated KeyValuePair pairs = 2; |
| 447 | } |
| 448 | |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 449 | /* |
| 450 | * ***************************************************************************** |
yro | de4ca10 | 2017-11-15 22:57:24 -0800 | [diff] [blame] | 451 | * 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] | 452 | * |
| 453 | * RULES: |
| 454 | * - The field ids for each atom must start at 1, and count upwards by 1. |
| 455 | * Skipping field ids is not allowed. |
| 456 | * - These form an API, so renaming, renumbering or removing fields is |
| 457 | * not allowed between android releases. (This is not currently enforced, |
| 458 | * but there will be a tool to enforce this restriction). |
| 459 | * - The types must be built-in protocol buffer types, namely, no sub-messages |
| 460 | * are allowed (yet). The bytes type is also not allowed. |
| 461 | * - The CamelCase name of the message type should match the |
Stefan Lafon | ae2df01 | 2017-11-14 09:17:21 -0800 | [diff] [blame] | 462 | * underscore_separated name as defined in Atom. |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 463 | * - 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] | 464 | * be exactly one AttributionChain field. It must be field number 1. |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 465 | * - A field that is a uid should be a string field, tagged with the [xxx] |
| 466 | * annotation. The generated code on android will be represented by UIDs, |
| 467 | * and those UIDs will be translated in xxx to those strings. |
| 468 | * |
| 469 | * CONVENTIONS: |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 470 | * - Events are past tense. e.g. ScreenStateChanged, not ScreenStateChange. |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 471 | * - If there is a UID, it goes first. Think in an object-oriented fashion. |
| 472 | * ***************************************************************************** |
| 473 | */ |
Stefan Lafon | cdb1a0e | 2017-09-27 20:24:15 -0700 | [diff] [blame] | 474 | |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 475 | /** |
Tej Singh | a7234499 | 2019-04-17 18:55:08 -0700 | [diff] [blame] | 476 | * This atom is deprecated starting in Q. Please use ThermalThrottlingSeverityStateChanged. |
Yangster-mac | e16189a | 2018-08-26 12:20:16 -0700 | [diff] [blame] | 477 | * Logs when the Thermal service HAL notifies the throttling start/stop events. |
| 478 | * |
| 479 | * Logged from: |
| 480 | * frameworks/base/services/core/java/com/android/server/stats/StatsCompanionService.java |
| 481 | */ |
| 482 | message ThermalThrottlingStateChanged { |
Maggie White | 442b631 | 2019-04-05 16:26:44 -0700 | [diff] [blame] | 483 | // The type of temperature being reported (CPU, GPU, SKIN, etc) |
Yangster-mac | e16189a | 2018-08-26 12:20:16 -0700 | [diff] [blame] | 484 | optional android.os.TemperatureTypeEnum sensor_type = 1; |
| 485 | |
Maggie White | 442b631 | 2019-04-05 16:26:44 -0700 | [diff] [blame] | 486 | // Throttling state, this field is DEPRECATED |
Yangster-mac | e16189a | 2018-08-26 12:20:16 -0700 | [diff] [blame] | 487 | enum State { |
| 488 | UNKNOWN = 0; |
Maggie White | 442b631 | 2019-04-05 16:26:44 -0700 | [diff] [blame] | 489 | START = 1; // START indicated that throttling was triggered. |
| 490 | STOP = 2; // STOP indicates that throttling was cleared. |
Yangster-mac | e16189a | 2018-08-26 12:20:16 -0700 | [diff] [blame] | 491 | } |
Yangster-mac | e16189a | 2018-08-26 12:20:16 -0700 | [diff] [blame] | 492 | optional State state = 2; |
| 493 | |
| 494 | optional float temperature = 3; |
| 495 | } |
| 496 | |
| 497 | /** |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 498 | * Logs when the screen state changes. |
| 499 | * |
| 500 | * Logged from: |
| 501 | * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java |
| 502 | */ |
| 503 | message ScreenStateChanged { |
Bookatz | 1a1b046 | 2018-01-12 11:47:03 -0800 | [diff] [blame] | 504 | // New screen state, from frameworks/base/core/proto/android/view/enums.proto. |
Yangster-mac | b6b77c6 | 2018-10-12 19:33:24 -0700 | [diff] [blame] | 505 | optional android.view.DisplayStateEnum state = 1 [(state_field_option).option = EXCLUSIVE]; |
Stefan Lafon | cdb1a0e | 2017-09-27 20:24:15 -0700 | [diff] [blame] | 506 | } |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 507 | |
| 508 | /** |
Chenjie Yu | bd1a28f | 2018-07-17 14:55:19 -0700 | [diff] [blame] | 509 | * Logs that the process state of the uid, as determined by ActivityManager |
| 510 | * (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] | 511 | * |
| 512 | * Logged from: |
| 513 | * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java |
| 514 | */ |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 515 | message UidProcessStateChanged { |
Yangster-mac | b6b77c6 | 2018-10-12 19:33:24 -0700 | [diff] [blame] | 516 | optional int32 uid = 1 [(state_field_option).option = PRIMARY, (is_uid) = true]; |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 517 | |
Bookatz | db026a2 | 2018-01-10 19:01:56 -0800 | [diff] [blame] | 518 | // The state, from frameworks/base/core/proto/android/app/enums.proto. |
Yangster-mac | b6b77c6 | 2018-10-12 19:33:24 -0700 | [diff] [blame] | 519 | optional android.app.ProcessStateEnum state = 2 [(state_field_option).option = EXCLUSIVE]; |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 520 | } |
| 521 | |
| 522 | /** |
Chenjie Yu | bd1a28f | 2018-07-17 14:55:19 -0700 | [diff] [blame] | 523 | * Logs process state change of a process, as per the activity manager. |
| 524 | * |
| 525 | * Logged from: |
| 526 | * frameworks/base/services/core/java/com/android/server/am/ProcessRecord.java |
| 527 | */ |
| 528 | message ProcessStateChanged { |
| 529 | optional int32 uid = 1; |
| 530 | optional string process_name = 2; |
| 531 | optional string package_name = 3; |
| 532 | // TODO: remove this when validation is done |
| 533 | optional int64 version = 5; |
| 534 | // The state, from frameworks/base/core/proto/android/app/enums.proto. |
| 535 | optional android.app.ProcessStateEnum state = 4; |
| 536 | } |
| 537 | |
| 538 | /** |
| 539 | * Logs when ActivityManagerService sleep state is changed. |
| 540 | * |
| 541 | * Logged from: |
| 542 | * frameworks/base/services/core/java/com/android/server/am/ActivityTaskManagerService.java |
| 543 | */ |
| 544 | message ActivityManagerSleepStateChanged { |
| 545 | // TODO: import frameworks proto |
| 546 | enum State { |
| 547 | UNKNOWN = 0; |
| 548 | ASLEEP = 1; |
| 549 | AWAKE = 2; |
| 550 | } |
Yangster-mac | b6b77c6 | 2018-10-12 19:33:24 -0700 | [diff] [blame] | 551 | optional State state = 1 [(state_field_option).option = EXCLUSIVE]; |
Chenjie Yu | bd1a28f | 2018-07-17 14:55:19 -0700 | [diff] [blame] | 552 | } |
| 553 | |
| 554 | /** |
| 555 | * Logs when system memory state changes. |
| 556 | * |
| 557 | * Logged from: |
| 558 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
| 559 | */ |
| 560 | message MemoryFactorStateChanged { |
| 561 | // TODO: import frameworks proto |
| 562 | enum State { |
| 563 | MEMORY_UNKNOWN = 0; |
| 564 | NORMAL = 1; // normal. |
| 565 | MODERATE = 2; // moderate memory pressure. |
| 566 | LOW = 3; // low memory. |
| 567 | CRITICAL = 4; // critical memory. |
| 568 | |
| 569 | } |
Yangster-mac | b6b77c6 | 2018-10-12 19:33:24 -0700 | [diff] [blame] | 570 | optional State factor = 1 [(state_field_option).option = EXCLUSIVE]; |
Chenjie Yu | bd1a28f | 2018-07-17 14:55:19 -0700 | [diff] [blame] | 571 | } |
| 572 | |
| 573 | /** |
| 574 | * Logs when app is using too much cpu, according to ActivityManagerService. |
| 575 | * |
| 576 | * Logged from: |
| 577 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
| 578 | */ |
| 579 | message ExcessiveCpuUsageReported { |
| 580 | optional int32 uid = 1; |
| 581 | optional string process_name = 2; |
| 582 | optional string package_name = 3; |
| 583 | // package version. TODO: remove this when validation is done |
| 584 | optional int64 version = 4; |
| 585 | } |
| 586 | |
| 587 | /** |
| 588 | * Logs when a cached process is killed, along with its pss. |
| 589 | * |
| 590 | * Logged from: |
| 591 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
| 592 | */ |
| 593 | message CachedKillReported { |
| 594 | optional int32 uid = 1; |
| 595 | optional string process_name = 2; |
| 596 | optional string package_name = 3; |
| 597 | // TODO: remove this when validation is done |
| 598 | optional int64 version = 5; |
| 599 | optional int64 pss = 4; |
| 600 | } |
| 601 | |
| 602 | /** |
| 603 | * Logs when memory stats of a process is reported. |
| 604 | * |
| 605 | * Logged from: |
| 606 | * frameworks/base/services/core/java/com/android/server/am/ProcessRecord.java |
| 607 | */ |
| 608 | message ProcessMemoryStatReported { |
| 609 | optional int32 uid = 1; |
| 610 | optional string process_name = 2; |
| 611 | optional string package_name = 3; |
| 612 | //TODO: remove this when validation is done |
| 613 | optional int64 version = 9; |
| 614 | optional int64 pss = 4; |
| 615 | optional int64 uss = 5; |
| 616 | optional int64 rss = 6; |
| 617 | enum Type { |
| 618 | ADD_PSS_INTERNAL_SINGLE = 0; |
| 619 | ADD_PSS_INTERNAL_ALL_MEM = 1; |
| 620 | ADD_PSS_INTERNAL_ALL_POLL = 2; |
| 621 | ADD_PSS_EXTERNAL = 3; |
| 622 | ADD_PSS_EXTERNAL_SLOW = 4; |
| 623 | } |
| 624 | optional Type type = 7; |
Muhammad Qureshi | dda7320 | 2019-03-07 13:54:20 -0800 | [diff] [blame] | 625 | optional int64 duration_millis = 8; |
Chenjie Yu | bd1a28f | 2018-07-17 14:55:19 -0700 | [diff] [blame] | 626 | } |
| 627 | |
| 628 | /** |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 629 | * Logs that a process started, finished, crashed, or ANRed. |
| 630 | * |
| 631 | * Logged from: |
| 632 | * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java |
| 633 | */ |
| 634 | message ProcessLifeCycleStateChanged { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 635 | optional int32 uid = 1 [(is_uid) = true]; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 636 | |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 637 | // The process name (usually same as the app name). |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 638 | optional string process_name = 2; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 639 | |
Bookatz | ddccf0a | 2017-11-28 16:48:14 -0800 | [diff] [blame] | 640 | // What lifecycle state the process changed to. |
| 641 | // This enum is specific to atoms.proto. |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 642 | enum State { |
| 643 | FINISHED = 0; |
| 644 | STARTED = 1; |
| 645 | CRASHED = 2; |
Bookatz | ddccf0a | 2017-11-28 16:48:14 -0800 | [diff] [blame] | 646 | } |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 647 | optional State state = 3; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 648 | } |
| 649 | |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 650 | /** |
| 651 | * Logs when the ble scan state changes. |
| 652 | * |
| 653 | * Logged from: |
Bookatz | 17a879d | 2018-03-28 15:05:28 -0700 | [diff] [blame] | 654 | * packages/apps/Bluetooth/src/com/android/bluetooth/gatt/AppScanStats.java |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 655 | */ |
| 656 | message BleScanStateChanged { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 657 | repeated AttributionNode attribution_node = 1; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 658 | |
| 659 | enum State { |
| 660 | OFF = 0; |
| 661 | ON = 1; |
Bookatz | e5ec0b4 | 2018-03-26 13:34:56 -0700 | [diff] [blame] | 662 | // RESET indicates all ble stopped. Used when it (re)starts (e.g. after it crashes). |
| 663 | RESET = 2; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 664 | } |
| 665 | optional State state = 2; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 666 | |
Bookatz | e5ec0b4 | 2018-03-26 13:34:56 -0700 | [diff] [blame] | 667 | // Does the scan have a filter. |
| 668 | optional bool is_filtered = 3; |
| 669 | // Whether the scan is a CALLBACK_TYPE_FIRST_MATCH scan. Called 'background' scan internally. |
| 670 | optional bool is_first_match = 4; |
| 671 | // Whether the scan set to piggy-back off the results of other scans (SCAN_MODE_OPPORTUNISTIC). |
| 672 | optional bool is_opportunistic = 5; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 673 | } |
| 674 | |
| 675 | /** |
| 676 | * Logs reporting of a ble scan finding results. |
| 677 | * |
| 678 | * Logged from: |
Bookatz | ae6738e | 2018-09-13 11:38:56 -0700 | [diff] [blame] | 679 | * packages/apps/Bluetooth/src/com/android/bluetooth/gatt/AppScanStats.java |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 680 | */ |
Bookatz | ae6738e | 2018-09-13 11:38:56 -0700 | [diff] [blame] | 681 | // TODO: Consider also tracking per-scanner-id. |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 682 | message BleScanResultReceived { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 683 | repeated AttributionNode attribution_node = 1; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 684 | |
| 685 | // Number of ble scan results returned. |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 686 | optional int32 num_results = 2; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 687 | } |
| 688 | |
| 689 | /** |
| 690 | * Logs when a sensor state changes. |
| 691 | * |
| 692 | * Logged from: |
Bookatz | 235343d | 2018-03-26 13:03:50 -0700 | [diff] [blame] | 693 | * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 694 | */ |
| 695 | message SensorStateChanged { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 696 | repeated AttributionNode attribution_node = 1; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 697 | |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 698 | // The id (int) of the sensor. |
| 699 | optional int32 sensor_id = 2; |
| 700 | |
| 701 | enum State { |
| 702 | OFF = 0; |
| 703 | ON = 1; |
| 704 | } |
| 705 | optional State state = 3; |
| 706 | } |
| 707 | |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 708 | /** |
| 709 | * Logs when GPS state changes. |
| 710 | * |
| 711 | * Logged from: |
| 712 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
| 713 | */ |
| 714 | message GpsScanStateChanged { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 715 | repeated AttributionNode attribution_node = 1; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 716 | |
| 717 | enum State { |
| 718 | OFF = 0; |
| 719 | ON = 1; |
| 720 | } |
| 721 | optional State state = 2; |
| 722 | } |
| 723 | |
Bookatz | 48d362e | 2018-11-06 15:49:08 -0800 | [diff] [blame] | 724 | /** |
| 725 | * Logs when GPS signal quality. |
| 726 | * |
| 727 | * Logged from: |
| 728 | * /frameworks/base/location/java/com/android/internal/location/gnssmetrics/GnssMetrics.java |
| 729 | */ |
| 730 | message GpsSignalQualityChanged { |
| 731 | optional android.server.location.GpsSignalQualityEnum level = 1; |
| 732 | } |
| 733 | |
Blake Kragten | 212edc7 | 2019-10-15 13:26:50 -0700 | [diff] [blame] | 734 | /** |
| 735 | * Gps location status report |
| 736 | * |
| 737 | * Logged from: |
| 738 | * /frameworks/base/location/java/com/android/internal/location/gnssmetrics/GnssMetrics.java |
| 739 | */ |
| 740 | message GpsLocationStatusReported { |
| 741 | // Boolean stating if location was acquired |
| 742 | optional bool location_success = 1; |
| 743 | } |
| 744 | |
| 745 | /** |
| 746 | * Gps log time to first fix report |
| 747 | * |
| 748 | * Logged from: |
| 749 | * /frameworks/base/location/java/com/android/internal/location/gnssmetrics/GnssMetrics.java |
| 750 | */ |
| 751 | message GpsTimeToFirstFixReported { |
| 752 | // int32 reporting the time to first fix in milliseconds |
| 753 | optional int32 time_to_first_fix_millis = 1; |
| 754 | } |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 755 | |
| 756 | /** |
| 757 | * Logs when a sync manager sync state changes. |
| 758 | * |
| 759 | * Logged from: |
Bookatz | 235343d | 2018-03-26 13:03:50 -0700 | [diff] [blame] | 760 | * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 761 | */ |
| 762 | message SyncStateChanged { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 763 | repeated AttributionNode attribution_node = 1; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 764 | |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 765 | // 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] | 766 | optional string sync_name = 2; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 767 | |
| 768 | enum State { |
| 769 | OFF = 0; |
| 770 | ON = 1; |
| 771 | } |
| 772 | optional State state = 3; |
| 773 | } |
| 774 | |
Yangster-mac | 9635300 | 2018-09-05 11:18:55 -0700 | [diff] [blame] | 775 | /* |
| 776 | * Deferred job stats. |
| 777 | * |
| 778 | * Logged from: |
| 779 | * frameworks/base/services/core/java/com/android/server/job/JobSchedulerService.java |
| 780 | */ |
| 781 | message DeferredJobStatsReported { |
| 782 | repeated AttributionNode attribution_node = 1; |
| 783 | |
| 784 | // Number of jobs deferred. |
| 785 | optional int32 num_jobs_deferred = 2; |
| 786 | |
| 787 | // Time since the last job runs. |
| 788 | optional int64 time_since_last_job_millis = 3; |
| 789 | } |
| 790 | |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 791 | /** |
| 792 | * Logs when a job scheduler job state changes. |
| 793 | * |
| 794 | * Logged from: |
Bookatz | 235343d | 2018-03-26 13:03:50 -0700 | [diff] [blame] | 795 | * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 796 | */ |
| 797 | message ScheduledJobStateChanged { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 798 | repeated AttributionNode attribution_node = 1; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 799 | |
| 800 | // Name of the job (as named in the app) |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 801 | optional string job_name = 2; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 802 | |
| 803 | enum State { |
Tej Singh | d5747a6 | 2018-01-08 20:57:35 -0800 | [diff] [blame] | 804 | FINISHED = 0; |
| 805 | STARTED = 1; |
| 806 | SCHEDULED = 2; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 807 | } |
| 808 | optional State state = 3; |
| 809 | |
Tej Singh | 33a412b | 2018-03-16 18:43:59 -0700 | [diff] [blame] | 810 | // The reason a job has stopped. |
| 811 | // This is only applicable when the state is FINISHED. |
Bookatz | 235343d | 2018-03-26 13:03:50 -0700 | [diff] [blame] | 812 | // The default value is STOP_REASON_UNKNOWN. |
Tej Singh | 33a412b | 2018-03-16 18:43:59 -0700 | [diff] [blame] | 813 | optional android.app.job.StopReasonEnum stop_reason = 4; |
Ben Murdoch | 741e335 | 2019-05-09 11:27:28 +0100 | [diff] [blame] | 814 | |
| 815 | // The standby bucket of the app that scheduled the job. These match the framework constants |
| 816 | // defined in JobSchedulerService.java with the addition of UNKNOWN using -1, as ACTIVE is |
| 817 | // already assigned 0. |
| 818 | enum Bucket { |
| 819 | UNKNOWN = -1; |
| 820 | ACTIVE = 0; |
| 821 | WORKING_SET = 1; |
| 822 | FREQUENT = 2; |
| 823 | RARE = 3; |
| 824 | NEVER = 4; |
| 825 | } |
| 826 | optional Bucket standby_bucket = 5 [default = UNKNOWN]; |
| 827 | |
| 828 | // The job id (as assigned by the app). |
| 829 | optional int32 job_id = 6; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 830 | } |
| 831 | |
| 832 | /** |
| 833 | * Logs when the audio state changes. |
| 834 | * |
| 835 | * Logged from: |
Bookatz | 235343d | 2018-03-26 13:03:50 -0700 | [diff] [blame] | 836 | * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 837 | */ |
| 838 | message AudioStateChanged { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 839 | repeated AttributionNode attribution_node = 1; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 840 | |
| 841 | enum State { |
| 842 | OFF = 0; |
| 843 | ON = 1; |
Bookatz | 235343d | 2018-03-26 13:03:50 -0700 | [diff] [blame] | 844 | // RESET indicates all audio stopped. Used when it (re)starts (e.g. after it crashes). |
| 845 | RESET = 2; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 846 | } |
| 847 | optional State state = 2; |
| 848 | } |
| 849 | |
| 850 | /** |
| 851 | * Logs when the video codec state changes. |
| 852 | * |
| 853 | * Logged from: |
Bookatz | 235343d | 2018-03-26 13:03:50 -0700 | [diff] [blame] | 854 | * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 855 | */ |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 856 | message MediaCodecStateChanged { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 857 | repeated AttributionNode attribution_node = 1; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 858 | |
| 859 | enum State { |
| 860 | OFF = 0; |
| 861 | ON = 1; |
Bookatz | 235343d | 2018-03-26 13:03:50 -0700 | [diff] [blame] | 862 | // RESET indicates all mediaCodec stopped. Used when it (re)starts (e.g. after it crashes). |
| 863 | RESET = 2; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 864 | } |
| 865 | optional State state = 2; |
| 866 | } |
| 867 | |
| 868 | /** |
| 869 | * Logs when the flashlight state changes. |
| 870 | * |
| 871 | * Logged from: |
Bookatz | 235343d | 2018-03-26 13:03:50 -0700 | [diff] [blame] | 872 | * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 873 | */ |
| 874 | message FlashlightStateChanged { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 875 | repeated AttributionNode attribution_node = 1; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 876 | |
| 877 | enum State { |
| 878 | OFF = 0; |
| 879 | ON = 1; |
Bookatz | 235343d | 2018-03-26 13:03:50 -0700 | [diff] [blame] | 880 | // RESET indicates all flashlight stopped. Used when it (re)starts (e.g. after it crashes). |
| 881 | RESET = 2; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 882 | } |
| 883 | optional State state = 2; |
| 884 | } |
| 885 | |
| 886 | /** |
| 887 | * Logs when the camera state changes. |
| 888 | * |
| 889 | * Logged from: |
Bookatz | 235343d | 2018-03-26 13:03:50 -0700 | [diff] [blame] | 890 | * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 891 | */ |
| 892 | message CameraStateChanged { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 893 | repeated AttributionNode attribution_node = 1; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 894 | |
| 895 | enum State { |
| 896 | OFF = 0; |
| 897 | ON = 1; |
Bookatz | 235343d | 2018-03-26 13:03:50 -0700 | [diff] [blame] | 898 | // RESET indicates all camera stopped. Used when it (re)starts (e.g. after it crashes). |
| 899 | RESET = 2; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 900 | } |
| 901 | optional State state = 2; |
| 902 | } |
| 903 | |
| 904 | /** |
| 905 | * 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] | 906 | * |
| 907 | * Logged from: |
| 908 | * TODO |
| 909 | */ |
Bookatz | d674624 | 2017-10-24 18:39:35 -0700 | [diff] [blame] | 910 | message WakelockStateChanged { |
Yangster-mac | 2087716 | 2017-12-22 17:19:39 -0800 | [diff] [blame] | 911 | repeated AttributionNode attribution_node = 1; |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 912 | |
Bookatz | 1a1b046 | 2018-01-12 11:47:03 -0800 | [diff] [blame] | 913 | // The type (level) of the wakelock; e.g. a partial wakelock or a full wakelock. |
| 914 | // From frameworks/base/core/proto/android/os/enums.proto. |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 915 | optional android.os.WakeLockLevelEnum type = 2; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 916 | |
| 917 | // The wakelock tag (Called tag in the Java API, sometimes name elsewhere). |
| 918 | optional string tag = 3; |
| 919 | |
| 920 | enum State { |
Yangster-mac | cfdf3a4 | 2017-12-06 13:42:38 -0800 | [diff] [blame] | 921 | RELEASE = 0; |
| 922 | ACQUIRE = 1; |
| 923 | CHANGE_RELEASE = 2; |
| 924 | CHANGE_ACQUIRE = 3; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 925 | } |
| 926 | optional State state = 4; |
| 927 | } |
| 928 | |
| 929 | /** |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 930 | * Logs when a partial wakelock is considered 'long' (over 1 min). |
| 931 | * |
| 932 | * Logged from: |
| 933 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
| 934 | */ |
| 935 | message LongPartialWakelockStateChanged { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 936 | repeated AttributionNode attribution_node = 1; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 937 | |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 938 | // The wakelock tag (Called tag in the Java API, sometimes name elsewhere). |
| 939 | optional string tag = 2; |
| 940 | |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 941 | // TODO: I have no idea what this is. |
| 942 | optional string history_tag = 3; |
| 943 | |
| 944 | enum State { |
| 945 | OFF = 0; |
| 946 | ON = 1; |
| 947 | } |
| 948 | optional State state = 4; |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 949 | } |
| 950 | |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 951 | /** |
Bookatz | a66083f | 2018-09-20 17:24:00 -0700 | [diff] [blame] | 952 | * Logs when the device is interactive, according to the PowerManager Notifier. |
| 953 | * |
| 954 | * Logged from: |
| 955 | * frameworks/base/services/core/java/com/android/server/power/Notifier.java |
| 956 | */ |
| 957 | message InteractiveStateChanged { |
| 958 | enum State { |
| 959 | OFF = 0; |
| 960 | ON = 1; |
| 961 | } |
| 962 | optional State state = 1; |
| 963 | } |
| 964 | |
| 965 | /** |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 966 | * Logs Battery Saver state change. |
| 967 | * |
| 968 | * Logged from: |
| 969 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
| 970 | */ |
| 971 | message BatterySaverModeStateChanged { |
| 972 | enum State { |
| 973 | OFF = 0; |
| 974 | ON = 1; |
| 975 | } |
| 976 | optional State state = 1; |
| 977 | } |
| 978 | |
| 979 | /** |
| 980 | * Logs Doze mode state change. |
| 981 | * |
| 982 | * Logged from: |
Bookatz | ddccf0a | 2017-11-28 16:48:14 -0800 | [diff] [blame] | 983 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 984 | */ |
| 985 | message DeviceIdleModeStateChanged { |
Bookatz | 8bdae8d | 2018-01-16 11:24:30 -0800 | [diff] [blame] | 986 | optional android.server.DeviceIdleModeEnum state = 1; |
Bookatz | ddccf0a | 2017-11-28 16:48:14 -0800 | [diff] [blame] | 987 | } |
| 988 | |
| 989 | |
| 990 | /** |
| 991 | * Logs state change of Doze mode including maintenance windows. |
| 992 | * |
| 993 | * Logged from: |
| 994 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
| 995 | */ |
| 996 | message DeviceIdlingModeStateChanged { |
Bookatz | 8bdae8d | 2018-01-16 11:24:30 -0800 | [diff] [blame] | 997 | optional android.server.DeviceIdleModeEnum state = 1; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 998 | } |
| 999 | |
| 1000 | /** |
| 1001 | * Logs screen brightness level. |
| 1002 | * |
| 1003 | * Logged from: |
| 1004 | * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java |
| 1005 | */ |
| 1006 | message ScreenBrightnessChanged { |
| 1007 | // Screen brightness level. Should be in [-1, 255] according to PowerManager.java. |
| 1008 | optional int32 level = 1; |
Bookatz | 8c6571b | 2017-10-24 15:04:41 -0700 | [diff] [blame] | 1009 | } |
| 1010 | |
| 1011 | /** |
| 1012 | * Logs battery level (percent full, from 0 to 100). |
| 1013 | * |
| 1014 | * Logged from: |
David Chen | c28b2bb | 2017-10-24 12:52:52 -0700 | [diff] [blame] | 1015 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
Bookatz | 8c6571b | 2017-10-24 15:04:41 -0700 | [diff] [blame] | 1016 | */ |
| 1017 | message BatteryLevelChanged { |
| 1018 | // Battery level. Should be in [0, 100]. |
| 1019 | optional int32 battery_level = 1; |
| 1020 | } |
| 1021 | |
| 1022 | /** |
| 1023 | * Logs change in charging status of the device. |
| 1024 | * |
| 1025 | * Logged from: |
David Chen | c28b2bb | 2017-10-24 12:52:52 -0700 | [diff] [blame] | 1026 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
Bookatz | 8c6571b | 2017-10-24 15:04:41 -0700 | [diff] [blame] | 1027 | */ |
| 1028 | message ChargingStateChanged { |
Bookatz | 1a1b046 | 2018-01-12 11:47:03 -0800 | [diff] [blame] | 1029 | // State of the battery, from frameworks/base/core/proto/android/os/enums.proto. |
| 1030 | optional android.os.BatteryStatusEnum state = 1; |
Bookatz | 8c6571b | 2017-10-24 15:04:41 -0700 | [diff] [blame] | 1031 | } |
| 1032 | |
| 1033 | /** |
| 1034 | * Logs whether the device is plugged in, and what power source it is using. |
| 1035 | * |
| 1036 | * Logged from: |
David Chen | c28b2bb | 2017-10-24 12:52:52 -0700 | [diff] [blame] | 1037 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
Bookatz | 8c6571b | 2017-10-24 15:04:41 -0700 | [diff] [blame] | 1038 | */ |
| 1039 | message PluggedStateChanged { |
Bookatz | 1a1b046 | 2018-01-12 11:47:03 -0800 | [diff] [blame] | 1040 | // Whether the device is plugged in, from frameworks/base/core/proto/android/os/enums.proto. |
| 1041 | optional android.os.BatteryPluggedStateEnum state = 1; |
Bookatz | 8c6571b | 2017-10-24 15:04:41 -0700 | [diff] [blame] | 1042 | } |
| 1043 | |
Bookatz | 8c6571b | 2017-10-24 15:04:41 -0700 | [diff] [blame] | 1044 | /** |
| 1045 | * Logs when an app's wakeup alarm fires. |
| 1046 | * |
| 1047 | * Logged from: |
David Chen | c28b2bb | 2017-10-24 12:52:52 -0700 | [diff] [blame] | 1048 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
Bookatz | 8c6571b | 2017-10-24 15:04:41 -0700 | [diff] [blame] | 1049 | */ |
| 1050 | message WakeupAlarmOccurred { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 1051 | repeated AttributionNode attribution_node = 1; |
Bookatz | ddccf0a | 2017-11-28 16:48:14 -0800 | [diff] [blame] | 1052 | |
| 1053 | // Name of the wakeup alarm. |
| 1054 | optional string tag = 2; |
Bookatz | caf2293e | 2018-09-23 13:07:43 -0700 | [diff] [blame] | 1055 | |
| 1056 | // Name of source package (for historical reasons, since BatteryStats tracked it). |
| 1057 | optional string package_name = 3; |
Ben Murdoch | 3389f152 | 2019-05-21 15:05:34 +0100 | [diff] [blame] | 1058 | |
| 1059 | // These enum values match the STANDBY_BUCKET_XXX constants defined in UsageStatsManager.java. |
| 1060 | enum Bucket { |
| 1061 | UNKNOWN = 0; |
| 1062 | EXEMPTED = 5; |
| 1063 | ACTIVE = 10; |
| 1064 | WORKING_SET = 20; |
| 1065 | FREQUENT = 30; |
| 1066 | RARE = 40; |
| 1067 | NEVER = 50; |
| 1068 | } |
| 1069 | // The App Standby bucket of the app that scheduled the alarm at the time the alarm fired. |
| 1070 | optional Bucket app_standby_bucket = 4; |
Bookatz | ddccf0a | 2017-11-28 16:48:14 -0800 | [diff] [blame] | 1071 | } |
| 1072 | |
| 1073 | /** |
| 1074 | * Logs when an an app causes the mobile radio to change state. |
| 1075 | * Changing from LOW to MEDIUM or HIGH can be considered the app waking the mobile radio. |
| 1076 | * |
| 1077 | * Logged from: |
Bookatz | 0b028b1 | 2018-05-31 16:51:17 -0700 | [diff] [blame] | 1078 | * frameworks/base/services/core/java/com/android/server/NetworkManagementService.java |
Bookatz | ddccf0a | 2017-11-28 16:48:14 -0800 | [diff] [blame] | 1079 | */ |
| 1080 | message MobileRadioPowerStateChanged { |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 1081 | repeated AttributionNode attribution_node = 1; |
Bookatz | ddccf0a | 2017-11-28 16:48:14 -0800 | [diff] [blame] | 1082 | |
Bookatz | 1a1b046 | 2018-01-12 11:47:03 -0800 | [diff] [blame] | 1083 | // Power state, from frameworks/base/core/proto/android/telephony/enums.proto. |
| 1084 | optional android.telephony.DataConnectionPowerStateEnum state = 2; |
Bookatz | ddccf0a | 2017-11-28 16:48:14 -0800 | [diff] [blame] | 1085 | } |
| 1086 | |
| 1087 | /** |
| 1088 | * Logs when an an app causes the wifi radio to change state. |
| 1089 | * Changing from LOW to MEDIUM or HIGH can be considered the app waking the wifi radio. |
| 1090 | * |
| 1091 | * Logged from: |
Bookatz | 0b028b1 | 2018-05-31 16:51:17 -0700 | [diff] [blame] | 1092 | * frameworks/base/services/core/java/com/android/server/NetworkManagementService.java |
Bookatz | ddccf0a | 2017-11-28 16:48:14 -0800 | [diff] [blame] | 1093 | */ |
| 1094 | message WifiRadioPowerStateChanged { |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 1095 | repeated AttributionNode attribution_node = 1; |
Bookatz | ddccf0a | 2017-11-28 16:48:14 -0800 | [diff] [blame] | 1096 | |
Bookatz | 1a1b046 | 2018-01-12 11:47:03 -0800 | [diff] [blame] | 1097 | // Power state, from frameworks/base/core/proto/android/telephony/enums.proto. |
| 1098 | optional android.telephony.DataConnectionPowerStateEnum state = 2; |
Bookatz | 8c6571b | 2017-10-24 15:04:41 -0700 | [diff] [blame] | 1099 | } |
| 1100 | |
| 1101 | /** |
| 1102 | * Logs kernel wakeup reasons and aborts. |
| 1103 | * |
| 1104 | * Logged from: |
Bookatz | 56585ca | 2018-09-07 11:38:45 -0700 | [diff] [blame] | 1105 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
Bookatz | 8c6571b | 2017-10-24 15:04:41 -0700 | [diff] [blame] | 1106 | */ |
| 1107 | message KernelWakeupReported { |
| 1108 | // Name of the kernel wakeup reason (or abort). |
| 1109 | optional string wakeup_reason_name = 1; |
| 1110 | |
| 1111 | // Duration (in microseconds) for the wake-up interrupt to be serviced. |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 1112 | optional int64 duration_micros = 2; |
Bookatz | e588524 | 2017-10-24 20:10:31 -0700 | [diff] [blame] | 1113 | } |
| 1114 | |
| 1115 | /** |
Bookatz | da1798c | 2018-12-13 14:16:00 -0800 | [diff] [blame] | 1116 | * Logs when Wifi is toggled on/off. |
Bookatz | a0a1f8a | 2018-12-17 12:28:32 -0800 | [diff] [blame] | 1117 | * 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] | 1118 | * |
| 1119 | * Logged from: |
| 1120 | * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java |
| 1121 | */ |
| 1122 | message WifiEnabledStateChanged { |
| 1123 | enum State { |
| 1124 | OFF = 0; |
| 1125 | ON = 1; |
| 1126 | } |
| 1127 | optional State state = 1; |
| 1128 | } |
| 1129 | |
| 1130 | /** |
| 1131 | * 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] | 1132 | * TODO: Include support for Hotspot, perhaps by using an extra field to denote 'mode'. |
| 1133 | * Note that Wifi Scanning is monitored separately in WifiScanStateChanged. |
Bookatz | da1798c | 2018-12-13 14:16:00 -0800 | [diff] [blame] | 1134 | * |
| 1135 | * Logged from: |
| 1136 | * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java |
| 1137 | */ |
| 1138 | message WifiRunningStateChanged { |
| 1139 | repeated AttributionNode attribution_node = 1; |
| 1140 | |
| 1141 | enum State { |
| 1142 | OFF = 0; |
| 1143 | ON = 1; |
| 1144 | } |
| 1145 | optional State state = 2; |
| 1146 | } |
| 1147 | |
| 1148 | /** |
Bookatz | e588524 | 2017-10-24 20:10:31 -0700 | [diff] [blame] | 1149 | * Logs wifi locks held by an app. |
| 1150 | * |
| 1151 | * Logged from: |
David Chen | c28b2bb | 2017-10-24 12:52:52 -0700 | [diff] [blame] | 1152 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
Bookatz | e588524 | 2017-10-24 20:10:31 -0700 | [diff] [blame] | 1153 | */ |
| 1154 | message WifiLockStateChanged { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 1155 | repeated AttributionNode attribution_node = 1; |
Bookatz | e588524 | 2017-10-24 20:10:31 -0700 | [diff] [blame] | 1156 | |
| 1157 | enum State { |
| 1158 | OFF = 0; |
| 1159 | ON = 1; |
| 1160 | } |
| 1161 | optional State state = 2; |
Bookatz | 11257ca | 2018-12-05 18:22:39 -0800 | [diff] [blame] | 1162 | |
| 1163 | // WifiLock type, from frameworks/base/core/proto/android/wifi/enums.proto. |
| 1164 | optional android.net.wifi.WifiModeEnum mode = 3; |
Bookatz | e588524 | 2017-10-24 20:10:31 -0700 | [diff] [blame] | 1165 | } |
| 1166 | |
| 1167 | /** |
| 1168 | * Logs wifi signal strength changes. |
| 1169 | * |
| 1170 | * Logged from: |
Bookatz | 819ea83 | 2018-11-28 16:53:31 -0800 | [diff] [blame] | 1171 | * frameworks/opt/net/wifi/service/java/com/android/server/wifi/ClientModeImpl.java |
Bookatz | e588524 | 2017-10-24 20:10:31 -0700 | [diff] [blame] | 1172 | */ |
| 1173 | message WifiSignalStrengthChanged { |
Bookatz | 1a1b046 | 2018-01-12 11:47:03 -0800 | [diff] [blame] | 1174 | // Signal strength, from frameworks/base/core/proto/android/telephony/enums.proto. |
| 1175 | optional android.telephony.SignalStrengthEnum signal_strength = 1; |
Bookatz | e588524 | 2017-10-24 20:10:31 -0700 | [diff] [blame] | 1176 | } |
| 1177 | |
| 1178 | /** |
| 1179 | * Logs wifi scans performed by an app. |
| 1180 | * |
| 1181 | * Logged from: |
Bookatz | 819ea83 | 2018-11-28 16:53:31 -0800 | [diff] [blame] | 1182 | * frameworks/opt/net/wifi/service/java/com/android/server/wifi/scanner/WifiScanningServiceImpl.java |
Bookatz | e588524 | 2017-10-24 20:10:31 -0700 | [diff] [blame] | 1183 | */ |
| 1184 | message WifiScanStateChanged { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 1185 | repeated AttributionNode attribution_node = 1; |
Bookatz | e588524 | 2017-10-24 20:10:31 -0700 | [diff] [blame] | 1186 | |
| 1187 | enum State { |
| 1188 | OFF = 0; |
| 1189 | ON = 1; |
| 1190 | } |
| 1191 | optional State state = 2; |
| 1192 | } |
| 1193 | |
| 1194 | /** |
Tej Singh | 4503e10 | 2018-01-04 14:35:01 -0800 | [diff] [blame] | 1195 | * Logs wifi multicast locks held by an app |
| 1196 | * |
| 1197 | * Logged from: |
Bookatz | 819ea83 | 2018-11-28 16:53:31 -0800 | [diff] [blame] | 1198 | * frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiMulticastLockManager.java |
Tej Singh | 4503e10 | 2018-01-04 14:35:01 -0800 | [diff] [blame] | 1199 | */ |
| 1200 | message WifiMulticastLockStateChanged { |
| 1201 | repeated AttributionNode attribution_node = 1; |
| 1202 | |
| 1203 | enum State { |
| 1204 | OFF = 0; |
| 1205 | ON = 1; |
| 1206 | } |
| 1207 | optional State state = 2; |
Bookatz | 819ea83 | 2018-11-28 16:53:31 -0800 | [diff] [blame] | 1208 | |
| 1209 | optional string tag = 3; |
Tej Singh | 4503e10 | 2018-01-04 14:35:01 -0800 | [diff] [blame] | 1210 | } |
| 1211 | |
| 1212 | /** |
Tej Singh | 1ea4289 | 2018-01-19 09:27:00 -0800 | [diff] [blame] | 1213 | * Logs shutdown reason and duration on next boot. |
| 1214 | * |
| 1215 | * Logged from: |
| 1216 | * frameworks/base/core/java/com/android/server/BootReceiver.java |
| 1217 | */ |
| 1218 | message ShutdownSequenceReported { |
| 1219 | // True if shutdown is for a reboot. Default: false if we do not know. |
| 1220 | optional bool reboot = 1; |
| 1221 | |
| 1222 | // Reason for shutdown. Eg: userrequested. Default: "<EMPTY>". |
| 1223 | optional string reason = 2; |
| 1224 | |
| 1225 | // Beginning of shutdown time in ms using wall clock time since unix epoch. |
| 1226 | // Default: 0 if no start time received. |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 1227 | optional int64 start_time_millis = 3; |
Tej Singh | 1ea4289 | 2018-01-19 09:27:00 -0800 | [diff] [blame] | 1228 | |
| 1229 | // Duration of shutdown in ms. Default: 0 if no duration received. |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 1230 | optional int64 duration_millis = 4; |
Tej Singh | 1ea4289 | 2018-01-19 09:27:00 -0800 | [diff] [blame] | 1231 | } |
| 1232 | |
Tej Singh | 6483ea4 | 2018-01-25 17:45:49 -0800 | [diff] [blame] | 1233 | |
| 1234 | /** |
| 1235 | * Logs boot reason and duration. |
| 1236 | * |
| 1237 | * Logged from: |
| 1238 | * system/core/bootstat/bootstat.cpp |
| 1239 | */ |
| 1240 | message BootSequenceReported { |
| 1241 | // Reason for bootloader boot. Eg. reboot. See bootstat.cpp for larger list |
| 1242 | // Default: "<EMPTY>" if not available. |
| 1243 | optional string bootloader_reason = 1; |
| 1244 | |
| 1245 | // Reason for system boot. Eg. bootloader, reboot,userrequested |
| 1246 | // Default: "<EMPTY>" if not available. |
| 1247 | optional string system_reason = 2; |
| 1248 | |
| 1249 | // 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] | 1250 | optional int64 end_time_millis = 3; |
Tej Singh | 6483ea4 | 2018-01-25 17:45:49 -0800 | [diff] [blame] | 1251 | |
| 1252 | // Total boot duration in ms. |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 1253 | optional int64 total_duration_millis = 4; |
Tej Singh | 6483ea4 | 2018-01-25 17:45:49 -0800 | [diff] [blame] | 1254 | |
| 1255 | // Bootloader duration in ms. |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 1256 | optional int64 bootloader_duration_millis = 5; |
Tej Singh | 6483ea4 | 2018-01-25 17:45:49 -0800 | [diff] [blame] | 1257 | |
| 1258 | // Time since last boot in ms. Default: 0 if not available. |
| 1259 | optional int64 time_since_last_boot = 6; |
| 1260 | } |
| 1261 | |
Tej Singh | c477d9c | 2018-02-05 18:31:39 -0800 | [diff] [blame] | 1262 | |
| 1263 | /** |
| 1264 | * Logs call state and disconnect cause (if applicable). |
| 1265 | * |
| 1266 | * Logged from: |
| 1267 | * packages/services/Telecomm/src/com/android/server/telecom/Call.java |
| 1268 | */ |
| 1269 | message CallStateChanged { |
| 1270 | // The state of the call. Eg. DIALING, ACTIVE, ON_HOLD, DISCONNECTED. |
| 1271 | // From frameworks/base/core/proto/android/telecomm/enums.proto. |
| 1272 | optional android.telecom.CallStateEnum call_state = 1; |
| 1273 | |
| 1274 | // The reason the call disconnected. Eg. ERROR, MISSED, REJECTED, BUSY. |
| 1275 | // This value is only applicable when the call_state is DISCONNECTED, and |
| 1276 | // should always be UNKNOWN if the call_state is not DISCONNECTED. |
| 1277 | // From frameworks/base/core/proto/android/telecomm/enums.proto. |
| 1278 | optional android.telecom.DisconnectCauseEnum disconnect_cause = 2; |
| 1279 | |
| 1280 | // True if the call is self-managed, which are apps that use the |
| 1281 | // telecom infrastructure to make their own calls. |
| 1282 | optional bool self_managed = 3; |
| 1283 | |
| 1284 | // True if call is external. External calls are calls on connected Wear |
| 1285 | // devices but show up in Telecom so the user can pull them onto the device. |
| 1286 | optional bool external_call = 4; |
| 1287 | } |
| 1288 | |
Tej Singh | 1ea4289 | 2018-01-19 09:27:00 -0800 | [diff] [blame] | 1289 | /** |
Tej Singh | dd7bd35 | 2018-02-09 19:33:15 -0800 | [diff] [blame] | 1290 | * Logs keyguard state. The keyguard is the lock screen. |
| 1291 | * |
| 1292 | * Logged from: |
| 1293 | * frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java |
| 1294 | */ |
| 1295 | message KeyguardStateChanged { |
| 1296 | enum State { |
| 1297 | UNKNOWN = 0; |
| 1298 | // The keyguard is hidden when the phone is unlocked. |
| 1299 | HIDDEN = 1; |
| 1300 | // The keyguard is shown when the phone is locked (screen turns off). |
| 1301 | SHOWN= 2; |
| 1302 | // The keyguard is occluded when something is overlaying the keyguard. |
| 1303 | // Eg. Opening the camera while on the lock screen. |
| 1304 | OCCLUDED = 3; |
| 1305 | } |
| 1306 | optional State state = 1; |
| 1307 | } |
| 1308 | |
| 1309 | /** |
| 1310 | * Logs keyguard bouncer state. The bouncer is a part of the keyguard, and |
| 1311 | * prompts the user to enter a password (pattern, pin, etc). |
| 1312 | * |
| 1313 | * Logged from: |
| 1314 | * frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBouncer.java |
| 1315 | */ |
| 1316 | |
| 1317 | message KeyguardBouncerStateChanged { |
| 1318 | enum State { |
| 1319 | UNKNOWN = 0; |
| 1320 | // Bouncer is hidden, either as a result of successfully entering the |
| 1321 | // password, screen timing out, or user going back to lock screen. |
| 1322 | HIDDEN = 1; |
| 1323 | // This is when the user is being prompted to enter the password. |
| 1324 | SHOWN = 2; |
| 1325 | } |
| 1326 | optional State state = 1; |
| 1327 | } |
| 1328 | |
| 1329 | /** |
| 1330 | * Logs the result of entering a password into the keyguard bouncer. |
| 1331 | * |
| 1332 | * Logged from: |
| 1333 | * frameworks/base/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainer.java |
| 1334 | */ |
| 1335 | message KeyguardBouncerPasswordEntered { |
| 1336 | enum BouncerResult { |
| 1337 | UNKNOWN = 0; |
| 1338 | // The password entered was incorrect. |
| 1339 | FAILURE = 1; |
| 1340 | // The password entered was correct. |
| 1341 | SUCCESS = 2; |
| 1342 | } |
| 1343 | optional BouncerResult result = 1; |
| 1344 | } |
| 1345 | |
Tej Singh | a883b37 | 2018-02-15 11:30:01 -0800 | [diff] [blame] | 1346 | /* |
| 1347 | * Logs changes to the configuration of the device. The configuration is defined |
| 1348 | * in frameworks/base/core/java/android/content/res/Configuration.java |
| 1349 | * More documentation is at https://d.android.com/reference/android/content/res/Configuration.html |
| 1350 | * Please go there to interpret the possible values each field can be. |
| 1351 | * |
| 1352 | * Logged from: |
| 1353 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
| 1354 | */ |
| 1355 | message ResourceConfigurationChanged { |
| 1356 | // Bit mask of color capabilities of the screen. |
| 1357 | // Contains information about the color gamut and hdr mode of the screen. |
| 1358 | // See: https://d.android.com/reference/android/content/res/Configuration.html#colorMode |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 1359 | optional int32 color_mode = 1; |
Tej Singh | a883b37 | 2018-02-15 11:30:01 -0800 | [diff] [blame] | 1360 | |
| 1361 | // The target screen density being rendered to. |
| 1362 | // See: https://d.android.com/reference/android/content/res/Configuration.html#densityDpi |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 1363 | optional int32 density_dpi = 2; |
Tej Singh | a883b37 | 2018-02-15 11:30:01 -0800 | [diff] [blame] | 1364 | |
| 1365 | // Current user preference for the scaling factor for fonts, |
| 1366 | // relative to the base density scaling. |
| 1367 | // See: https://d.android.com/reference/android/content/res/Configuration.html#fontScale |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 1368 | optional float font_scale = 3; |
Tej Singh | a883b37 | 2018-02-15 11:30:01 -0800 | [diff] [blame] | 1369 | |
| 1370 | // Flag indicating whether the hard keyboard is hidden. |
| 1371 | // See: https://d.android.com/reference/android/content/res/Configuration.html#hardKeyboardHidden |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 1372 | optional int32 hard_keyboard_hidden = 4; |
Tej Singh | a883b37 | 2018-02-15 11:30:01 -0800 | [diff] [blame] | 1373 | |
| 1374 | // The type of keyboard attached to the device. |
| 1375 | // See: https://d.android.com/reference/android/content/res/Configuration.html#keyboard |
| 1376 | optional int32 keyboard = 5; |
| 1377 | |
| 1378 | // Flag indicating whether any keyboard is available. Takes soft keyboards into account. |
| 1379 | // See: https://d.android.com/reference/android/content/res/Configuration.html#keyboardHidden |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 1380 | optional int32 keyboard_hidden = 6; |
Tej Singh | a883b37 | 2018-02-15 11:30:01 -0800 | [diff] [blame] | 1381 | |
| 1382 | // IMSI MCC (Mobile Country Code), corresponding to mcc resource qualifier. |
| 1383 | // 0 if undefined. |
| 1384 | // See: https://d.android.com/reference/android/content/res/Configuration.html#mcc |
| 1385 | optional int32 mcc = 7; |
| 1386 | |
| 1387 | // IMSI MNC (Mobile Network Code), corresponding to mnc resource qualifier. |
| 1388 | // 0 if undefined. Note: the actual MNC may be 0, to check for this use the |
| 1389 | // MNC_ZERO symbol defined in Configuration.java. |
| 1390 | // See: https://d.android.com/reference/android/content/res/Configuration.html#mnc |
| 1391 | optional int32 mnc = 8; |
| 1392 | |
| 1393 | // The kind of navigation available on the device. |
| 1394 | // See: https://developer.android.com/reference/android/content/res/Configuration.html#navigation |
| 1395 | optional int32 navigation = 9; |
| 1396 | |
| 1397 | // Flag indicating whether the navigation is available. |
| 1398 | // See: https://d.android.com/reference/android/content/res/Configuration.html#navigationHidden |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 1399 | optional int32 navigation_hidden = 10; |
Tej Singh | a883b37 | 2018-02-15 11:30:01 -0800 | [diff] [blame] | 1400 | |
| 1401 | // Overall orientation of the screen. |
| 1402 | // See: https://d.android.com/reference/android/content/res/Configuration.html#orientation |
| 1403 | optional int32 orientation = 11; |
| 1404 | |
| 1405 | // The current height of the available screen space, in dp units. |
| 1406 | // See: https://d.android.com/reference/android/content/res/Configuration.html#screenHeightDp |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 1407 | optional int32 screen_height_dp = 12; |
Tej Singh | a883b37 | 2018-02-15 11:30:01 -0800 | [diff] [blame] | 1408 | |
| 1409 | // Bit mask of overall layout of the screen. |
| 1410 | // Contains information about screen size, whether the screen is wider/taller |
| 1411 | // than normal, whether the screen layout is right-tl-left or left-to-right, |
| 1412 | // and whether the screen has a rounded shape. |
| 1413 | // See: https://d.android.com/reference/android/content/res/Configuration.html#screenLayout |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 1414 | optional int32 screen_layout = 13; |
Tej Singh | a883b37 | 2018-02-15 11:30:01 -0800 | [diff] [blame] | 1415 | |
| 1416 | // Current width of the available screen space, in dp units. |
| 1417 | // See: https://d.android.com/reference/android/content/res/Configuration.html#screenWidthDp |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 1418 | optional int32 screen_width_dp = 14; |
Tej Singh | a883b37 | 2018-02-15 11:30:01 -0800 | [diff] [blame] | 1419 | |
| 1420 | // The smallest screen size an application will see in normal operation. |
| 1421 | // This is the smallest value of both screenWidthDp and screenHeightDp |
| 1422 | // in portrait and landscape. |
| 1423 | // See: https://d.android.com/reference/android/content/res/Configuration.html#smallestScreenWidthDp |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 1424 | optional int32 smallest_screen_width_dp = 15; |
Tej Singh | a883b37 | 2018-02-15 11:30:01 -0800 | [diff] [blame] | 1425 | |
| 1426 | // The type of touch screen attached to the device. |
| 1427 | // See: https://d.android.com/reference/android/content/res/Configuration.html#touchscreen |
| 1428 | optional int32 touchscreen = 16; |
| 1429 | |
| 1430 | // Bit mask of the ui mode. |
| 1431 | // Contains information about the overall ui mode of the device. |
| 1432 | // Eg: NORMAL, DESK, CAR, TELEVISION, WATCH, VR_HEADSET |
| 1433 | // Also contains information about whether the device is in night mode. |
| 1434 | // See: https://d.android.com/reference/android/content/res/Configuration.html#uiMode |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 1435 | optional int32 ui_mode = 17; |
Tej Singh | a883b37 | 2018-02-15 11:30:01 -0800 | [diff] [blame] | 1436 | } |
| 1437 | |
Tej Singh | eee317b | 2018-03-07 19:28:05 -0800 | [diff] [blame] | 1438 | |
| 1439 | /** |
| 1440 | * Logs changes in the connection state of the mobile radio. |
| 1441 | * |
| 1442 | * Logged from: |
| 1443 | * frameworks/opt/telephony/src/java/com/android/internal/telephony/dataconnection/DataConnection.java |
| 1444 | */ |
| 1445 | message MobileConnectionStateChanged { |
| 1446 | // States are from the state machine DataConnection.java. |
| 1447 | enum State { |
| 1448 | UNKNOWN = 0; |
| 1449 | // The connection is inactive, or disconnected. |
| 1450 | INACTIVE = 1; |
| 1451 | // The connection is being activated, or connecting. |
| 1452 | ACTIVATING = 2; |
| 1453 | // The connection is active, or connected. |
| 1454 | ACTIVE = 3; |
| 1455 | // The connection is disconnecting. |
| 1456 | DISCONNECTING = 4; |
| 1457 | // The connection is disconnecting after creating a connection. |
| 1458 | DISCONNECTION_ERROR_CREATING_CONNECTION = 5; |
| 1459 | } |
| 1460 | optional State state = 1; |
| 1461 | // For multi-sim phones, this distinguishes between the sim cards. |
| 1462 | optional int32 sim_slot_index = 2; |
| 1463 | // Used to identify the connection. Starts at 0 and increments by 1 for |
| 1464 | // every new network created. Resets whenever the device reboots. |
| 1465 | optional int32 data_connection_id = 3; |
| 1466 | // A bitmask for the capabilities of this connection. |
| 1467 | // Eg. DEFAULT (internet), MMS, SUPL, DUN, IMS. |
| 1468 | // Default value (if we have no information): 0 |
| 1469 | optional int64 capabilities = 4; |
| 1470 | // If this connection has internet. |
| 1471 | // This just checks if the DEFAULT bit of capabilities is set. |
| 1472 | optional bool has_internet = 5; |
| 1473 | } |
| 1474 | |
| 1475 | /** |
| 1476 | * Logs changes in mobile radio technology. eg: LTE, EDGE, CDMA. |
| 1477 | * |
| 1478 | * Logged from: |
| 1479 | * frameworks/opt/telephony/src/java/com/android/internal/telephony/ServiceStateTracker.java |
| 1480 | */ |
| 1481 | message MobileRadioTechnologyChanged { |
| 1482 | optional android.telephony.NetworkTypeEnum state = 1; |
| 1483 | // For multi-sim phones, this distinguishes between the sim cards. |
| 1484 | optional int32 sim_slot_index = 2; |
| 1485 | } |
| 1486 | |
Andrew Chant | b56388b | 2018-03-22 21:07:33 -0700 | [diff] [blame] | 1487 | /** |
| 1488 | * Logs the VID and PID of any connected USB devices. |
| 1489 | * |
| 1490 | * Notes if any Audio, HID (input buttons/mouse/keyboard), or Storage interfaces are present. |
| 1491 | * |
| 1492 | * Logged by Vendor. |
| 1493 | */ |
| 1494 | message UsbDeviceAttached { |
| 1495 | optional int32 vid = 1; |
| 1496 | optional int32 pid = 2; |
| 1497 | optional bool has_audio = 3; |
| 1498 | optional bool has_hid = 4; |
| 1499 | optional bool has_storage = 5; |
Badhri Jagan Sridharan | 5ec629f | 2018-11-16 15:39:22 -0800 | [diff] [blame] | 1500 | enum State { |
| 1501 | STATE_DISCONNECTED = 0; |
| 1502 | STATE_CONNECTED = 1; |
| 1503 | } |
| 1504 | optional State state = 6; |
Badhri Jagan Sridharan | c2c54a2 | 2018-12-14 14:41:26 -0800 | [diff] [blame] | 1505 | optional int64 last_connect_duration_millis = 7; |
Andrew Chant | b56388b | 2018-03-22 21:07:33 -0700 | [diff] [blame] | 1506 | } |
| 1507 | |
Tej Singh | eee317b | 2018-03-07 19:28:05 -0800 | [diff] [blame] | 1508 | |
Tej Singh | dd7bd35 | 2018-02-09 19:33:15 -0800 | [diff] [blame] | 1509 | /** |
Tej Singh | 5d991e1 | 2018-03-09 19:48:11 -0800 | [diff] [blame] | 1510 | * Logs when Bluetooth is enabled and disabled. |
| 1511 | * |
| 1512 | * Logged from: |
| 1513 | * services/core/java/com/android/server/BluetoothManagerService.java |
| 1514 | */ |
| 1515 | message BluetoothEnabledStateChanged { |
| 1516 | repeated AttributionNode attribution_node = 1; |
| 1517 | // Whether or not bluetooth is enabled on the device. |
| 1518 | enum State { |
| 1519 | UNKNOWN = 0; |
| 1520 | ENABLED = 1; |
| 1521 | DISABLED = 2; |
| 1522 | } |
| 1523 | optional State state = 2; |
| 1524 | // The reason for being enabled/disabled. |
| 1525 | // Eg. Airplane mode, crash, application request. |
| 1526 | optional android.bluetooth.EnableDisableReasonEnum reason = 3; |
| 1527 | // 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] | 1528 | optional string pkg_name = 4; |
Tej Singh | 5d991e1 | 2018-03-09 19:48:11 -0800 | [diff] [blame] | 1529 | } |
| 1530 | |
| 1531 | /** |
Jack He | d9837c8 | 2019-01-09 01:19:13 -0800 | [diff] [blame] | 1532 | * Logs when profiles on a Bluetooth device connects and disconnects. |
Tej Singh | 5d991e1 | 2018-03-09 19:48:11 -0800 | [diff] [blame] | 1533 | * |
| 1534 | * Logged from: |
Jack He | d9837c8 | 2019-01-09 01:19:13 -0800 | [diff] [blame] | 1535 | * packages/apps/Bluetooth/src/com/android/bluetooth/btservice/RemoteDevices.java |
| 1536 | * |
| 1537 | * Next Tag: 5 |
Tej Singh | 5d991e1 | 2018-03-09 19:48:11 -0800 | [diff] [blame] | 1538 | */ |
| 1539 | message BluetoothConnectionStateChanged { |
| 1540 | // The state of the connection. |
| 1541 | // Eg: CONNECTING, CONNECTED, DISCONNECTING, DISCONNECTED. |
| 1542 | optional android.bluetooth.ConnectionStateEnum state = 1; |
| 1543 | // An identifier that can be used to match connect and disconnect events. |
| 1544 | // Currently is last two bytes of a hash of a device level ID and |
| 1545 | // the mac address of the bluetooth device that is connected. |
Jack He | d9837c8 | 2019-01-09 01:19:13 -0800 | [diff] [blame] | 1546 | // Deprecated: use obfuscated_id instead, this one is always 0 for Q+ |
Jack He | ac33c99 | 2019-04-03 16:08:21 -0700 | [diff] [blame] | 1547 | optional int32 obfuscated_id = 2 [deprecated = true]; |
Tej Singh | 5d991e1 | 2018-03-09 19:48:11 -0800 | [diff] [blame] | 1548 | // The profile that is connected. Eg. GATT, A2DP, HEADSET. |
| 1549 | // From android.bluetooth.BluetoothAdapter.java |
Jack He | d9837c8 | 2019-01-09 01:19:13 -0800 | [diff] [blame] | 1550 | // Default: 0 when not used |
Tej Singh | 5d991e1 | 2018-03-09 19:48:11 -0800 | [diff] [blame] | 1551 | optional int32 bt_profile = 3; |
Jack He | d9837c8 | 2019-01-09 01:19:13 -0800 | [diff] [blame] | 1552 | // An identifier that can be used to match events for this device. |
| 1553 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 1554 | // Salt: Randomly generated 256 bit value |
| 1555 | // Hash algorithm: HMAC-SHA256 |
| 1556 | // Size: 32 byte |
| 1557 | // Default: null or empty if the device identifier is not known |
Jack He | ac33c99 | 2019-04-03 16:08:21 -0700 | [diff] [blame] | 1558 | 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] | 1559 | } |
| 1560 | |
| 1561 | /** |
| 1562 | * Logs when a Bluetooth device connects and disconnects over ACL |
| 1563 | * |
| 1564 | * Logged from: |
| 1565 | * packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterProperties.java |
| 1566 | * |
| 1567 | * Next Tag: 3 |
| 1568 | */ |
| 1569 | message BluetoothAclConnectionStateChanged { |
| 1570 | // An identifier that can be used to match events for this device. |
| 1571 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 1572 | // Salt: Randomly generated 256 bit value |
| 1573 | // Hash algorithm: HMAC-SHA256 |
| 1574 | // Size: 32 byte |
| 1575 | // Default: null or empty if the device identifier is not known |
| 1576 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 1577 | // The state of the connection. |
| 1578 | // Eg: CONNECTING, CONNECTED, DISCONNECTING, DISCONNECTED. |
| 1579 | optional android.bluetooth.ConnectionStateEnum state = 2; |
| 1580 | } |
| 1581 | |
| 1582 | /** |
| 1583 | * Logs when a Bluetooth device connects and disconnects over SCO |
| 1584 | * |
| 1585 | * Logged from: |
| 1586 | * packages/apps/Bluetooth/src/com/android/bluetooth/hfp/HeadsetStateMachine.java |
| 1587 | * packages/apps/Bluetooth/src/com/android/bluetooth/hfp/HeadsetClientStateMachine.java |
| 1588 | * |
| 1589 | * Next Tag: 4 |
| 1590 | */ |
| 1591 | message BluetoothScoConnectionStateChanged { |
| 1592 | // An identifier that can be used to match events for this device. |
| 1593 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 1594 | // Salt: Randomly generated 256 bit value |
| 1595 | // Hash algorithm: HMAC-SHA256 |
| 1596 | // Size: 32 byte |
| 1597 | // Default: null or empty if the device identifier is not known |
| 1598 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 1599 | // The state of the connection. |
| 1600 | // Eg: CONNECTING, CONNECTED, DISCONNECTING, DISCONNECTED. |
| 1601 | optional android.bluetooth.ConnectionStateEnum state = 2; |
| 1602 | // Codec used for this SCO connection |
| 1603 | // Default: UNKNOWN |
| 1604 | optional android.bluetooth.hfp.ScoCodec codec = 3; |
Tej Singh | 5d991e1 | 2018-03-09 19:48:11 -0800 | [diff] [blame] | 1605 | } |
| 1606 | |
Jack He | c27040a | 2019-01-09 20:54:41 -0800 | [diff] [blame] | 1607 | /** |
| 1608 | * Logged when active device of a profile changes |
| 1609 | * |
| 1610 | * Logged from: |
| 1611 | * packages/apps/Bluetooth/src/com/android/bluetooth/a2dp/A2dpService.java |
| 1612 | * packages/apps/Bluetooth/src/com/android/bluetooth/hfp/HeadsetService.java |
| 1613 | * packages/apps/Bluetooth/src/com/android/bluetooth/hearingaid/HearingAidService.java |
| 1614 | */ |
| 1615 | message BluetoothActiveDeviceChanged { |
| 1616 | // The profile whose active device has changed. Eg. A2DP, HEADSET, HEARING_AID |
| 1617 | // From android.bluetooth.BluetoothProfile |
| 1618 | optional int32 bt_profile = 1; |
| 1619 | // An identifier that can be used to match events for this new active device. |
| 1620 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 1621 | // Salt: Randomly generated 256 bit value |
| 1622 | // Hash algorithm: HMAC-SHA256 |
| 1623 | // Size: 32 byte |
| 1624 | // Default: null or empty if there is no active device for this profile |
| 1625 | optional bytes obfuscated_id = 2 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 1626 | } |
| 1627 | |
Jack He | ab86dbd2 | 2018-12-18 15:43:27 -0800 | [diff] [blame] | 1628 | // Logs when there is an event affecting Bluetooth device's link layer connection. |
| 1629 | // - This event is triggered when there is a related HCI command or event |
| 1630 | // - Users of this metrics can deduce Bluetooth device's connection state from these events |
| 1631 | // - HCI commands are logged before the command is sent, after receiving command status, and after |
| 1632 | // receiving command complete |
| 1633 | // - HCI events are logged when they arrive |
| 1634 | // |
| 1635 | // Low level log from system/bt |
| 1636 | // |
| 1637 | // Bluetooth classic commands: |
| 1638 | // - CMD_CREATE_CONNECTION |
| 1639 | // - CMD_DISCONNECT |
| 1640 | // - CMD_CREATE_CONNECTION_CANCEL |
| 1641 | // - CMD_ACCEPT_CONNECTION_REQUEST |
| 1642 | // - CMD_REJECT_CONNECTION_REQUEST |
| 1643 | // - CMD_SETUP_ESCO_CONNECTION |
| 1644 | // - CMD_ACCEPT_ESCO_CONNECTION |
| 1645 | // - CMD_REJECT_ESCO_CONNECTION |
| 1646 | // - CMD_ENH_SETUP_ESCO_CONNECTION |
| 1647 | // - CMD_ENH_ACCEPT_ESCO_CONNECTION |
| 1648 | // |
| 1649 | // Bluetooth low energy commands: |
| 1650 | // - CMD_BLE_CREATE_LL_CONN [Only logged on error or when initiator filter policy is 0x00] |
| 1651 | // - CMD_BLE_CREATE_CONN_CANCEL [Only logged when there is an error] |
| 1652 | // - CMD_BLE_EXTENDED_CREATE_CONNECTION [Only logged on error or when initiator filter policy is 0x00] |
| 1653 | // - CMD_BLE_CLEAR_WHITE_LIST |
| 1654 | // - CMD_BLE_ADD_WHITE_LIST |
| 1655 | // - CMD_BLE_REMOVE_WHITE_LIST |
| 1656 | // |
| 1657 | // Bluetooth classic events: |
| 1658 | // - EVT_CONNECTION_COMP |
| 1659 | // - EVT_CONNECTION_REQUEST |
| 1660 | // - EVT_DISCONNECTION_COMP |
| 1661 | // - EVT_ESCO_CONNECTION_COMP |
| 1662 | // - EVT_ESCO_CONNECTION_CHANGED |
| 1663 | // |
| 1664 | // Bluetooth low energy meta events: |
| 1665 | // - BLE_EVT_CONN_COMPLETE_EVT |
| 1666 | // - BLE_EVT_ENHANCED_CONN_COMPLETE_EVT |
| 1667 | // |
| 1668 | // Next tag: 10 |
| 1669 | message BluetoothLinkLayerConnectionEvent { |
| 1670 | // An identifier that can be used to match events for this device. |
| 1671 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 1672 | // Salt: Randomly generated 256 bit value |
| 1673 | // Hash algorithm: HMAC-SHA256 |
| 1674 | // Size: 32 byte |
| 1675 | // Default: null or empty if the device identifier is not known |
| 1676 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 1677 | // Connection handle of this connection if available |
| 1678 | // Range: 0x0000 - 0x0EFF (12 bits) |
| 1679 | // Default: 0xFFFF if the handle is unknown |
| 1680 | optional int32 connection_handle = 2; |
| 1681 | // Direction of the link |
| 1682 | // Default: DIRECTION_UNKNOWN |
| 1683 | optional android.bluetooth.DirectionEnum direction = 3; |
| 1684 | // Type of this link |
| 1685 | // Default: LINK_TYPE_UNKNOWN |
| 1686 | optional android.bluetooth.LinkTypeEnum type = 4; |
| 1687 | |
| 1688 | // Reason metadata for this link layer connection event, rules for interpretation: |
| 1689 | // 1. If hci_cmd is set and valid, hci_event can be either EVT_COMMAND_STATUS or |
| 1690 | // EVT_COMMAND_COMPLETE, ignore hci_ble_event in this case |
| 1691 | // 2. If hci_event is set to EVT_BLE_META, look at hci_ble_event; otherwise, if hci_event is |
| 1692 | // set and valid, ignore hci_ble_event |
| 1693 | |
| 1694 | // HCI command associated with this event |
| 1695 | // Default: CMD_UNKNOWN |
| 1696 | optional android.bluetooth.hci.CommandEnum hci_cmd = 5; |
| 1697 | // HCI event associated with this event |
| 1698 | // Default: EVT_UNKNOWN |
| 1699 | optional android.bluetooth.hci.EventEnum hci_event = 6; |
| 1700 | // HCI BLE meta event associated with this event |
| 1701 | // Default: BLE_EVT_UNKNOWN |
| 1702 | optional android.bluetooth.hci.BleMetaEventEnum hci_ble_event = 7; |
| 1703 | // HCI command status code if this is triggerred by hci_cmd |
| 1704 | // Default: STATUS_UNKNOWN |
| 1705 | optional android.bluetooth.hci.StatusEnum cmd_status = 8; |
| 1706 | // HCI reason code associated with this event |
| 1707 | // Default: STATUS_UNKNOWN |
| 1708 | optional android.bluetooth.hci.StatusEnum reason_code = 9; |
| 1709 | } |
| 1710 | |
Howard Ro | e103fe2 | 2019-01-17 16:52:16 -0800 | [diff] [blame] | 1711 | /** |
| 1712 | * Logs when a module is rolled back by Watchdog. |
| 1713 | * |
| 1714 | * Logged from: Rollback Manager |
| 1715 | */ |
| 1716 | message WatchdogRollbackOccurred { |
| 1717 | enum RollbackType { |
| 1718 | UNKNOWN = 0; |
| 1719 | ROLLBACK_INITIATE = 1; |
| 1720 | ROLLBACK_SUCCESS = 2; |
| 1721 | ROLLBACK_FAILURE = 3; |
Howard Ro | e4d6fed | 2019-03-04 16:54:19 -0800 | [diff] [blame] | 1722 | ROLLBACK_BOOT_TRIGGERED = 4; |
Howard Ro | e103fe2 | 2019-01-17 16:52:16 -0800 | [diff] [blame] | 1723 | } |
| 1724 | optional RollbackType rollback_type = 1; |
| 1725 | |
| 1726 | optional string package_name = 2; |
| 1727 | |
| 1728 | optional int32 package_version_code = 3; |
Gavin Corkery | dd1daba | 2019-11-27 19:11:13 +0000 | [diff] [blame] | 1729 | |
| 1730 | enum RollbackReasonType { |
| 1731 | REASON_UNKNOWN = 0; |
| 1732 | REASON_NATIVE_CRASH = 1; |
| 1733 | REASON_EXPLICIT_HEALTH_CHECK = 2; |
| 1734 | REASON_APP_CRASH = 3; |
| 1735 | REASON_APP_NOT_RESPONDING = 4; |
| 1736 | } |
| 1737 | optional RollbackReasonType rollback_reason = 4; |
| 1738 | |
| 1739 | // Set by RollbackPackageHealthObserver to be the package that is failing when a rollback |
| 1740 | // is initiated. Empty if the package is unknown. |
| 1741 | optional string failing_package_name = 5; |
Howard Ro | e103fe2 | 2019-01-17 16:52:16 -0800 | [diff] [blame] | 1742 | } |
| 1743 | |
Jack He | c27040a | 2019-01-09 20:54:41 -0800 | [diff] [blame] | 1744 | /** |
| 1745 | * Logs when there is a change in Bluetooth A2DP playback state |
| 1746 | * |
| 1747 | * Logged from: |
| 1748 | * packages/apps/Bluetooth/src/com/android/bluetooth/a2dp/A2dpService.java |
| 1749 | */ |
| 1750 | message BluetoothA2dpPlaybackStateChanged { |
| 1751 | // An identifier that can be used to match events for this device. |
| 1752 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 1753 | // Salt: Randomly generated 256 bit value |
| 1754 | // Hash algorithm: HMAC-SHA256 |
| 1755 | // Size: 32 byte |
| 1756 | // Default: null or empty if the device identifier is not known |
| 1757 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 1758 | // Current playback state |
| 1759 | // Default: PLAYBACK_STATE_UNKNOWN |
| 1760 | optional android.bluetooth.a2dp.PlaybackStateEnum playback_state = 2; |
| 1761 | // Current audio coding mode |
| 1762 | // Default: AUDIO_CODING_MODE_UNKNOWN |
| 1763 | optional android.bluetooth.a2dp.AudioCodingModeEnum audio_coding_mode = 3; |
| 1764 | } |
| 1765 | |
| 1766 | /** |
| 1767 | * Logs when there is a change in A2DP codec config for a particular remote device |
| 1768 | * |
| 1769 | * Logged from: |
| 1770 | * frameworks/base/core/java/android/bluetooth/BluetoothCodecConfig.java |
| 1771 | * packages/apps/Bluetooth/src/com/android/bluetooth/a2dp/A2dpService.java |
| 1772 | */ |
| 1773 | message BluetoothA2dpCodecConfigChanged { |
| 1774 | // An identifier that can be used to match events for this device. |
| 1775 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 1776 | // Salt: Randomly generated 256 bit value |
| 1777 | // Hash algorithm: HMAC-SHA256 |
| 1778 | // Size: 32 byte |
| 1779 | // Default: null or empty if the device identifier is not known |
| 1780 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 1781 | // Type of codec as defined by various SOURCE_CODEC_TYPE_* constants in BluetoothCodecConfig |
| 1782 | // Default SOURCE_CODEC_TYPE_INVALID |
| 1783 | optional int32 codec_type = 2; |
| 1784 | // Codec priroity, the higher the more preferred, -1 for disabled |
| 1785 | // Default: CODEC_PRIORITY_DEFAULT |
| 1786 | optional int32 codec_priority = 3; |
| 1787 | // Sample rate in Hz as defined by various SAMPLE_RATE_* constants in BluetoothCodecConfig |
| 1788 | // Default: SAMPLE_RATE_NONE |
| 1789 | optional int32 sample_rate = 4; |
| 1790 | // Bits per sample as defined by various BITS_PER_SAMPLE_* constants in BluetoothCodecConfig |
| 1791 | // Default: BITS_PER_SAMPLE_NONE |
| 1792 | optional int32 bits_per_sample = 5; |
| 1793 | // Channel mode as defined by various CHANNEL_MODE_* constants in BluetoothCodecConfig |
| 1794 | // Default: CHANNEL_MODE_NONE |
| 1795 | optional int32 channel_mode = 6; |
| 1796 | // Codec specific values |
| 1797 | // Default 0 |
| 1798 | optional int64 codec_specific_1 = 7; |
| 1799 | optional int64 codec_specific_2 = 8; |
| 1800 | optional int64 codec_specific_3 = 9; |
| 1801 | optional int64 codec_specific_4 = 10; |
| 1802 | } |
| 1803 | |
| 1804 | /** |
| 1805 | * Logs when there is a change in selectable A2DP codec capability for a paricular remote device |
| 1806 | * Each codec's capability is logged separately due to statsd restriction |
| 1807 | * |
| 1808 | * Logged from: |
| 1809 | * frameworks/base/core/java/android/bluetooth/BluetoothCodecConfig.java |
| 1810 | * packages/apps/Bluetooth/src/com/android/bluetooth/a2dp/A2dpService.java |
| 1811 | */ |
| 1812 | message BluetoothA2dpCodecCapabilityChanged { |
| 1813 | // An identifier that can be used to match events for this device. |
| 1814 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 1815 | // Salt: Randomly generated 256 bit value |
| 1816 | // Hash algorithm: HMAC-SHA256 |
| 1817 | // Size: 32 byte |
| 1818 | // Default: null or empty if the device identifier is not known |
| 1819 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 1820 | // Type of codec as defined by various SOURCE_CODEC_TYPE_* constants in BluetoothCodecConfig |
| 1821 | // Default SOURCE_CODEC_TYPE_INVALID |
| 1822 | optional int32 codec_type = 2; |
| 1823 | // Codec priroity, the higher the more preferred, -1 for disabled |
| 1824 | // Default: CODEC_PRIORITY_DEFAULT |
| 1825 | optional int32 codec_priority = 3; |
| 1826 | // A bit field of supported sample rates as defined by various SAMPLE_RATE_* constants |
| 1827 | // in BluetoothCodecConfig |
| 1828 | // Default: empty and SAMPLE_RATE_NONE for individual item |
| 1829 | optional int32 sample_rate = 4; |
| 1830 | // A bit field of supported bits per sample as defined by various BITS_PER_SAMPLE_* constants |
| 1831 | // in BluetoothCodecConfig |
| 1832 | // Default: empty and BITS_PER_SAMPLE_NONE for individual item |
| 1833 | optional int32 bits_per_sample = 5; |
| 1834 | // A bit field of supported channel mode as defined by various CHANNEL_MODE_* constants in |
| 1835 | // BluetoothCodecConfig |
| 1836 | // Default: empty and CHANNEL_MODE_NONE for individual item |
| 1837 | optional int32 channel_mode = 6; |
| 1838 | // Codec specific values |
| 1839 | // Default 0 |
| 1840 | optional int64 codec_specific_1 = 7; |
| 1841 | optional int64 codec_specific_2 = 8; |
| 1842 | optional int64 codec_specific_3 = 9; |
| 1843 | optional int64 codec_specific_4 = 10; |
| 1844 | } |
| 1845 | |
| 1846 | /** |
| 1847 | * Logs when A2DP failed to read from PCM source. |
| 1848 | * This typically happens when audio HAL cannot supply A2DP with data fast enough for encoding. |
| 1849 | * |
| 1850 | * Logged from: |
| 1851 | * system/bt |
| 1852 | */ |
| 1853 | message BluetoothA2dpAudioUnderrunReported { |
| 1854 | // An identifier that can be used to match events for this device. |
| 1855 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 1856 | // Salt: Randomly generated 256 bit value |
| 1857 | // Hash algorithm: HMAC-SHA256 |
| 1858 | // Size: 32 byte |
| 1859 | // Default: null or empty if the device identifier is not known |
| 1860 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 1861 | // Encoding interval in nanoseconds |
| 1862 | // Default: 0 |
| 1863 | optional int64 encoding_interval_nanos = 2; |
| 1864 | // Number of bytes of PCM data that could not be read from the source |
| 1865 | // Default: 0 |
| 1866 | optional int32 num_missing_pcm_bytes = 3; |
| 1867 | } |
| 1868 | |
| 1869 | /** |
| 1870 | * Logs when A2DP failed send encoded data to the remote device fast enough such that the transmit |
| 1871 | * buffer queue is full and we have to drop data |
| 1872 | * |
| 1873 | * Logged from: |
| 1874 | * system/bt |
| 1875 | */ |
| 1876 | message BluetoothA2dpAudioOverrunReported { |
| 1877 | // An identifier that can be used to match events for this device. |
| 1878 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 1879 | // Salt: Randomly generated 256 bit value |
| 1880 | // Hash algorithm: HMAC-SHA256 |
| 1881 | // Size: 32 byte |
| 1882 | // Default: null or empty if the device identifier is not known |
| 1883 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 1884 | // Encoding interval in nanoseconds |
| 1885 | // Default: 0 |
| 1886 | optional int64 encoding_interval_nanos = 2; |
| 1887 | // Number of buffers dropped in this event |
| 1888 | // Each buffer is encoded in one encoding interval and consists of multiple encoded frames |
| 1889 | // Default: 0 |
| 1890 | optional int32 num_dropped_buffers = 3; |
| 1891 | // Number of encoded buffers dropped in this event |
| 1892 | // Default 0 |
| 1893 | optional int32 num_dropped_encoded_frames = 4; |
| 1894 | // Number of encoded bytes dropped in this event |
| 1895 | // Default: 0 |
| 1896 | optional int32 num_dropped_encoded_bytes = 5; |
| 1897 | } |
| 1898 | |
| 1899 | /** |
| 1900 | * Logs when we receive reports regarding a device's RSSI value |
| 1901 | * |
| 1902 | * Logged from: |
| 1903 | * system/bt |
| 1904 | */ |
| 1905 | message BluetoothDeviceRssiReported { |
| 1906 | // An identifier that can be used to match events for this device. |
| 1907 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 1908 | // Salt: Randomly generated 256 bit value |
| 1909 | // Hash algorithm: HMAC-SHA256 |
| 1910 | // Size: 32 byte |
| 1911 | // Default: null or empty if the device identifier is not known |
| 1912 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 1913 | // Connection handle of this connection if available |
| 1914 | // Range: 0x0000 - 0x0EFF (12 bits) |
| 1915 | // Default: 0xFFFF if the handle is unknown |
| 1916 | optional int32 connection_handle = 2; |
| 1917 | // HCI command status code if this is triggerred by hci_cmd |
| 1918 | // Default: STATUS_UNKNOWN |
| 1919 | optional android.bluetooth.hci.StatusEnum hci_status = 3; |
| 1920 | // BR/EDR |
| 1921 | // Range: -128 ≤ N ≤ 127 (signed integer) |
| 1922 | // Units: dB |
| 1923 | // LE: |
| 1924 | // Range: -127 to 20, 127 (signed integer) |
| 1925 | // Units: dBm |
| 1926 | // Invalid when an out of range value is reported |
| 1927 | optional int32 rssi = 4; |
| 1928 | } |
| 1929 | |
| 1930 | /** |
| 1931 | * Logs when we receive reports regarding how many consecutive failed contacts for a connection |
| 1932 | * |
| 1933 | * Logged from: |
| 1934 | * system/bt |
| 1935 | */ |
| 1936 | message BluetoothDeviceFailedContactCounterReported { |
| 1937 | // An identifier that can be used to match events for this device. |
| 1938 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 1939 | // Salt: Randomly generated 256 bit value |
| 1940 | // Hash algorithm: HMAC-SHA256 |
| 1941 | // Size: 32 byte |
| 1942 | // Default: null or empty if the device identifier is not known |
| 1943 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 1944 | // Connection handle of this connection if available |
| 1945 | // Range: 0x0000 - 0x0EFF (12 bits) |
| 1946 | // Default: 0xFFFF if the handle is unknown |
| 1947 | optional int32 connection_handle = 2; |
| 1948 | // HCI command status code if this is triggerred by hci_cmd |
| 1949 | // Default: STATUS_UNKNOWN |
| 1950 | optional android.bluetooth.hci.StatusEnum cmd_status = 3; |
| 1951 | // Number of consecutive failed contacts for a connection corresponding to the Handle |
| 1952 | // Range: uint16_t, 0-0xFFFF |
| 1953 | // Default: 0xFFFFF |
| 1954 | optional int32 failed_contact_counter = 4; |
| 1955 | } |
| 1956 | |
| 1957 | /** |
| 1958 | * Logs when we receive reports regarding the tranmit power level used for a specific connection |
| 1959 | * |
| 1960 | * Logged from: |
| 1961 | * system/bt |
| 1962 | */ |
| 1963 | message BluetoothDeviceTxPowerLevelReported { |
| 1964 | // An identifier that can be used to match events for this device. |
| 1965 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 1966 | // Salt: Randomly generated 256 bit value |
| 1967 | // Hash algorithm: HMAC-SHA256 |
| 1968 | // Size: 32 byte |
| 1969 | // Default: null or empty if the device identifier is not known |
| 1970 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 1971 | // Connection handle of this connection if available |
| 1972 | // Range: 0x0000 - 0x0EFF (12 bits) |
| 1973 | // Default: 0xFFFF if the handle is unknown |
| 1974 | optional int32 connection_handle = 2; |
Jack He | 1021a61 | 2019-01-20 21:22:46 -0800 | [diff] [blame] | 1975 | // HCI command status code if this is triggered by hci_cmd |
Jack He | c27040a | 2019-01-09 20:54:41 -0800 | [diff] [blame] | 1976 | // Default: STATUS_UNKNOWN |
| 1977 | optional android.bluetooth.hci.StatusEnum hci_status = 3; |
| 1978 | // Range: -30 ≤ N ≤ 20 |
| 1979 | // Units: dBm |
| 1980 | // Invalid when an out of range value is reported |
| 1981 | optional int32 transmit_power_level = 4; |
| 1982 | } |
Jack He | ab86dbd2 | 2018-12-18 15:43:27 -0800 | [diff] [blame] | 1983 | |
Tej Singh | 5d991e1 | 2018-03-09 19:48:11 -0800 | [diff] [blame] | 1984 | /** |
Jack He | 1021a61 | 2019-01-20 21:22:46 -0800 | [diff] [blame] | 1985 | * Logs when Bluetooth controller failed to reply with command status within a timeout period after |
| 1986 | * receiving an HCI command from the host |
| 1987 | * |
| 1988 | * Logged from: system/bt |
| 1989 | */ |
| 1990 | message BluetoothHciTimeoutReported { |
| 1991 | // HCI command associated with this event |
| 1992 | // Default: CMD_UNKNOWN |
| 1993 | optional android.bluetooth.hci.CommandEnum hci_command = 1; |
| 1994 | } |
| 1995 | |
| 1996 | /** |
| 1997 | * Logs when we receive Bluetooth Link Quality Report event from the controller |
| 1998 | * See Android Bluetooth HCI specification for more details |
| 1999 | * |
| 2000 | * Note: all count and bytes field are counted since last event |
| 2001 | * |
| 2002 | * Logged from: system/bt |
| 2003 | */ |
| 2004 | message BluetoothQualityReportReported { |
| 2005 | // Quality report ID |
| 2006 | // Original type: uint8_t |
| 2007 | // Default: BQR_ID_UNKNOWN |
| 2008 | optional android.bluetooth.hci.BqrIdEnum quality_report_id = 1; |
| 2009 | // Packet type of the connection |
| 2010 | // Original type: uint8_t |
| 2011 | // Default: BQR_PACKET_TYPE_UNKNOWN |
| 2012 | optional android.bluetooth.hci.BqrPacketTypeEnum packet_types = 2; |
| 2013 | // Connection handle of the connection |
| 2014 | // Original type: uint16_t |
| 2015 | optional int32 connection_handle = 3; |
| 2016 | // Performing Role for the connection |
| 2017 | // Original type: uint8_t |
| 2018 | optional int32 connection_role = 4; |
| 2019 | // Current Transmit Power Level for the connection. This value is the same as the controller's |
| 2020 | // response to the HCI_Read_Transmit_Power_Level HCI command |
| 2021 | // Original type: uint8_t |
| 2022 | optional int32 tx_power_level = 5; |
| 2023 | // Received Signal Strength Indication (RSSI) value for the connection. This value is an |
| 2024 | // absolute receiver signal strength value |
| 2025 | // Original type: int8_t |
| 2026 | optional int32 rssi = 6; |
| 2027 | // Signal-to-Noise Ratio (SNR) value for the connection. It is the average SNR of all the |
| 2028 | // channels used by the link currently |
| 2029 | // Original type: uint8_t |
| 2030 | optional int32 snr = 7; |
| 2031 | // Indicates the number of unused channels in AFH_channel_map |
| 2032 | // Original type: uint8_t |
| 2033 | optional int32 unused_afh_channel_count = 8; |
| 2034 | // Indicates the number of the channels which are interfered and quality is bad but are still |
| 2035 | // selected for AFH |
| 2036 | // Original type: uint8_t |
| 2037 | optional int32 afh_select_unideal_channel_count = 9; |
| 2038 | // Current Link Supervision Timeout Setting |
| 2039 | // Unit: N * 0.3125 ms (1 Bluetooth Clock) |
| 2040 | // Original type: uint16_t |
| 2041 | optional int32 lsto = 10; |
| 2042 | // Piconet Clock for the specified Connection_Handle. This value is the same as the controller's |
| 2043 | // response to HCI_Read_Clock HCI command with the parameter "Which_Clock" of |
| 2044 | // 0x01 (Piconet Clock) |
| 2045 | // Unit: N * 0.3125 ms (1 Bluetooth Clock) |
| 2046 | // Original type: uint32_t |
| 2047 | optional int64 connection_piconet_clock = 11; |
| 2048 | // The count of retransmission |
| 2049 | // Original type: uint32_t |
| 2050 | optional int64 retransmission_count = 12; |
| 2051 | // The count of no RX |
| 2052 | // Original type: uint32_t |
| 2053 | optional int64 no_rx_count = 13; |
| 2054 | // The count of NAK (Negative Acknowledge) |
| 2055 | // Original type: uint32_t |
| 2056 | optional int64 nak_count = 14; |
| 2057 | // Controller timestamp of last TX ACK |
| 2058 | // Unit: N * 0.3125 ms (1 Bluetooth Clock) |
| 2059 | // Original type: uint32_t |
| 2060 | optional int64 last_tx_ack_timestamp = 15; |
| 2061 | // The count of Flow-off (STOP) |
| 2062 | // Original type: uint32_t |
| 2063 | optional int64 flow_off_count = 16; |
| 2064 | // Controller timestamp of last Flow-on (GO) |
| 2065 | // Unit: N * 0.3125 ms (1 Bluetooth Clock) |
| 2066 | // Original type: uint32_t |
| 2067 | optional int64 last_flow_on_timestamp = 17; |
| 2068 | // Buffer overflow count (how many bytes of TX data are dropped) since the last event |
| 2069 | // Original type: uint32_t |
| 2070 | optional int64 buffer_overflow_bytes = 18; |
| 2071 | // Buffer underflow count (in byte) since last event |
| 2072 | // Original type: uint32_t |
| 2073 | optional int64 buffer_underflow_bytes = 19; |
| 2074 | } |
| 2075 | |
| 2076 | /** |
| 2077 | * Logs when a Bluetooth device's manufacturer information is learnt by the Bluetooth stack |
| 2078 | * |
| 2079 | * Notes: |
| 2080 | * - Each event can be partially filled as we might learn different pieces of device |
| 2081 | * information at different time |
| 2082 | * - Multiple device info events can be combined to give more complete picture |
| 2083 | * - When multiple device info events tries to describe the same information, the |
| 2084 | * later one wins |
| 2085 | * |
| 2086 | * Logged from: |
| 2087 | * packages/apps/Bluetooth |
| 2088 | */ |
Jack He | aea2698 | 2019-04-04 11:19:48 -0700 | [diff] [blame] | 2089 | message BluetoothDeviceInfoReported { |
Jack He | 1021a61 | 2019-01-20 21:22:46 -0800 | [diff] [blame] | 2090 | // An identifier that can be used to match events for this device. |
| 2091 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 2092 | // Salt: Randomly generated 256 bit value |
| 2093 | // Hash algorithm: HMAC-SHA256 |
| 2094 | // Size: 32 byte |
| 2095 | // Default: null or empty if the device identifier is not known |
| 2096 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 2097 | // Where is this device info obtained from |
| 2098 | optional android.bluetooth.DeviceInfoSrcEnum source_type = 2; |
| 2099 | // Name of the data source |
| 2100 | // For EXTERNAL: package name of the data source |
| 2101 | // For INTERNAL: null for general case, component name otherwise |
| 2102 | optional string source_name = 3; |
| 2103 | // Name of the manufacturer of this device |
| 2104 | optional string manufacturer = 4; |
| 2105 | // Model of this device |
| 2106 | optional string model = 5; |
| 2107 | // Hardware version of this device |
| 2108 | optional string hardware_version = 6; |
| 2109 | // Software version of this device |
| 2110 | optional string software_version = 7; |
| 2111 | } |
| 2112 | |
| 2113 | /** |
| 2114 | * Logs when we receive Bluetooth Read Remote Version Information Complete Event from the remote |
| 2115 | * device, as documented by the Bluetooth Core HCI specification |
| 2116 | * Reference: https://www.bluetooth.com/specifications/bluetooth-core-specification |
| 2117 | * Vol 2, Part E, Page 1118 |
| 2118 | * |
| 2119 | * Logged from: |
| 2120 | * system/bt |
| 2121 | */ |
| 2122 | message BluetoothRemoteVersionInfoReported { |
| 2123 | // Connection handle of the connection |
| 2124 | // Original type: uint16_t |
| 2125 | optional int32 connection_handle = 1; |
| 2126 | // HCI command status code |
| 2127 | // Default: STATUS_UNKNOWN |
| 2128 | optional android.bluetooth.hci.StatusEnum hci_status = 2; |
| 2129 | // 1 byte Version of current LMP in the remote controller |
| 2130 | optional int32 lmp_version = 3; |
| 2131 | // 2 bytes LMP manufacturer code of the remote controller |
| 2132 | // https://www.bluetooth.com/specifications/assigned-numbers/company-identifiers |
| 2133 | optional int32 lmp_manufacturer_code = 4; |
| 2134 | // 4 bytes subversion of the LMP in the remote controller |
| 2135 | optional int32 lmp_subversion = 5; |
| 2136 | } |
| 2137 | |
| 2138 | /** |
| 2139 | * Logs when certain Bluetooth SDP attributes are discovered |
| 2140 | * Constant definitions are from: |
| 2141 | * https://www.bluetooth.com/specifications/assigned-numbers/service-discovery |
| 2142 | * |
| 2143 | * Current logged attributes: |
| 2144 | * - BluetoothProfileDescriptorList |
| 2145 | * - Supported Features Bitmask |
| 2146 | * |
| 2147 | * Logged from: |
| 2148 | * system/bt |
| 2149 | */ |
| 2150 | message BluetoothSdpAttributeReported { |
| 2151 | // An identifier that can be used to match events for this device. |
| 2152 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 2153 | // Salt: Randomly generated 256 bit value |
| 2154 | // Hash algorithm: HMAC-SHA256 |
| 2155 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 2156 | // Short form UUIDs used to identify Bluetooth protocols, profiles, and service classes |
| 2157 | // Original type: uint16_t |
| 2158 | optional int32 protocol_uuid = 2; |
| 2159 | // Short form UUIDs used to identify Bluetooth SDP attribute types |
| 2160 | // Original type: uint16_t |
| 2161 | optional int32 attribute_id = 3; |
| 2162 | // Attribute value for the particular attribute |
| 2163 | optional bytes attribute_value = 4 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 2164 | } |
| 2165 | |
| 2166 | /** |
| 2167 | * Logs when bond state of a Bluetooth device changes |
| 2168 | * |
| 2169 | * Logged from: |
| 2170 | * frameworks/base/core/java/android/bluetooth/BluetoothDevice.java |
| 2171 | * packages/apps/Bluetooth/src/com/android/bluetooth/btservice/BondStateMachine.java |
| 2172 | */ |
| 2173 | message BluetoothBondStateChanged { |
| 2174 | // An identifier that can be used to match events for this device. |
| 2175 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 2176 | // Salt: Randomly generated 256 bit value |
| 2177 | // Hash algorithm: HMAC-SHA256 |
| 2178 | // Size: 32 byte |
| 2179 | // Default: null or empty if the device identifier is not known |
| 2180 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 2181 | // Preferred transport type to remote dual mode device |
| 2182 | // Default: TRANSPORT_AUTO means no preference |
| 2183 | optional android.bluetooth.TransportTypeEnum transport = 2; |
| 2184 | // The type of this Bluetooth device (Classic, LE, or Dual mode) |
| 2185 | // Default: UNKNOWN |
| 2186 | optional android.bluetooth.DeviceTypeEnum type = 3; |
| 2187 | // Current bond state (NONE, BONDING, BONDED) |
| 2188 | // Default: BOND_STATE_UNKNOWN |
| 2189 | optional android.bluetooth.BondStateEnum bond_state = 4; |
| 2190 | // Bonding sub state |
| 2191 | // Default: BOND_SUB_STATE_UNKNOWN |
| 2192 | optional android.bluetooth.BondSubStateEnum bonding_sub_state = 5; |
| 2193 | // Unbond Reason |
| 2194 | // Default: UNBOND_REASON_UNKNOWN |
| 2195 | optional android.bluetooth.UnbondReasonEnum unbond_reason = 6; |
| 2196 | } |
| 2197 | |
| 2198 | /** |
| 2199 | * Logs there is an event related Bluetooth classic pairing |
| 2200 | * |
| 2201 | * Logged from: |
| 2202 | * system/bt |
| 2203 | */ |
| 2204 | message BluetoothClassicPairingEventReported { |
| 2205 | // An identifier that can be used to match events for this device. |
| 2206 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 2207 | // Salt: Randomly generated 256 bit value |
| 2208 | // Hash algorithm: HMAC-SHA256 |
| 2209 | // Size: 32 byte |
| 2210 | // Default: null or empty if the device identifier is not known |
| 2211 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 2212 | // Connection handle of this connection if available |
| 2213 | // Range: 0x0000 - 0x0EFF (12 bits) |
| 2214 | // Default: 0xFFFF if the handle is unknown |
| 2215 | optional int32 connection_handle = 2; |
| 2216 | // HCI command associated with this event |
| 2217 | // Default: CMD_UNKNOWN |
| 2218 | optional android.bluetooth.hci.CommandEnum hci_cmd = 3; |
| 2219 | // HCI event associated with this event |
| 2220 | // Default: EVT_UNKNOWN |
| 2221 | optional android.bluetooth.hci.EventEnum hci_event = 4; |
| 2222 | // HCI command status code if this is triggerred by hci_cmd |
| 2223 | // Default: STATUS_UNKNOWN |
| 2224 | optional android.bluetooth.hci.StatusEnum cmd_status = 5; |
| 2225 | // HCI reason code associated with this event |
| 2226 | // Default: STATUS_UNKNOWN |
| 2227 | optional android.bluetooth.hci.StatusEnum reason_code = 6; |
Jack He | 3b25983 | 2019-03-20 03:47:29 -0700 | [diff] [blame] | 2228 | // A status value related to this specific event |
| 2229 | // Default: 0 |
| 2230 | optional int64 event_value = 7; |
Jack He | 1021a61 | 2019-01-20 21:22:46 -0800 | [diff] [blame] | 2231 | } |
| 2232 | |
| 2233 | /** |
| 2234 | * Logs when there is an event related to Bluetooth Security Manager Protocol (SMP) |
| 2235 | * |
| 2236 | * Logged from: |
| 2237 | * system/bt |
| 2238 | */ |
| 2239 | message BluetoothSmpPairingEventReported { |
| 2240 | // An identifier that can be used to match events for this device. |
| 2241 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 2242 | // Salt: Randomly generated 256 bit value |
| 2243 | // Hash algorithm: HMAC-SHA256 |
| 2244 | // Size: 32 byte |
| 2245 | // Default: null or empty if the device identifier is not known |
| 2246 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 2247 | // SMP command sent or received over L2CAP |
| 2248 | // Default: CMD_UNKNOWN |
| 2249 | optional android.bluetooth.smp.CommandEnum smp_command = 2; |
| 2250 | // Whether this command is sent or received |
| 2251 | // Default: DIRECTION_UNKNOWN |
| 2252 | optional android.bluetooth.DirectionEnum direction = 3; |
| 2253 | // SMP failure reason code |
| 2254 | // Default: PAIRING_FAIL_REASON_DEFAULT |
| 2255 | optional android.bluetooth.smp.PairingFailReasonEnum smp_fail_reason = 4; |
| 2256 | } |
| 2257 | |
| 2258 | /** |
Jack He | 815cdba | 2019-01-30 17:24:55 -0800 | [diff] [blame] | 2259 | * Logs when a Bluetooth socket’s connection state changed |
| 2260 | * |
| 2261 | * Logged from: |
| 2262 | * system/bt |
| 2263 | */ |
| 2264 | message BluetoothSocketConnectionStateChanged { |
| 2265 | // An identifier that can be used to match events for this device. |
| 2266 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 2267 | // Salt: Randomly generated 256 bit value |
| 2268 | // Hash algorithm: HMAC-SHA256 |
| 2269 | // Size: 32 byte |
Jack He | e4ae0e7 | 2019-02-07 13:52:45 -0800 | [diff] [blame] | 2270 | // Default: null or empty if this is a server listener socket |
Jack He | 815cdba | 2019-01-30 17:24:55 -0800 | [diff] [blame] | 2271 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
Jack He | e4ae0e7 | 2019-02-07 13:52:45 -0800 | [diff] [blame] | 2272 | // Temporary port of this socket for the current connection or session only |
Jack He | 815cdba | 2019-01-30 17:24:55 -0800 | [diff] [blame] | 2273 | // Default 0 when unknown or don't care |
| 2274 | optional int32 port = 2; |
| 2275 | // Socket type as mentioned in |
| 2276 | // frameworks/base/core/java/android/bluetooth/BluetoothSocket.java |
| 2277 | // Default: SOCKET_TYPE_UNKNOWN |
| 2278 | optional android.bluetooth.SocketTypeEnum type = 3; |
| 2279 | // Socket connection state |
| 2280 | // Default: SOCKET_CONNECTION_STATE_UNKNOWN |
| 2281 | optional android.bluetooth.SocketConnectionstateEnum state = 4; |
| 2282 | // Number of bytes sent to remote device during this connection |
| 2283 | optional int64 tx_bytes = 5; |
| 2284 | // Number of bytes received from remote device during this connection |
| 2285 | optional int64 rx_bytes = 6; |
Jack He | e4ae0e7 | 2019-02-07 13:52:45 -0800 | [diff] [blame] | 2286 | // Socket owner's UID |
| 2287 | optional int32 uid = 7 [(is_uid) = true]; |
| 2288 | // Server port of this socket, if any. When both |server_port| and |port| fields are populated, |
| 2289 | // |port| must be spawned by |server_port| |
| 2290 | // Default 0 when unknown or don't care |
| 2291 | optional int32 server_port = 8; |
| 2292 | // Whether this is a server listener socket |
| 2293 | optional android.bluetooth.SocketRoleEnum is_server = 9; |
Jack He | 815cdba | 2019-01-30 17:24:55 -0800 | [diff] [blame] | 2294 | } |
| 2295 | |
| 2296 | /** |
Jack He | 7142680 | 2019-04-02 13:32:52 -0700 | [diff] [blame] | 2297 | * Logs when Class of Device (CoD) value is learnt for a device during pairing or connection |
| 2298 | * |
| 2299 | * Logged from: |
| 2300 | * packages/apps/Bluetooth/src/com/android/bluetooth/btservice/BondStateMachine.java |
| 2301 | * packages/apps/Bluetooth/src/com/android/bluetooth/btservice/RemoteDevices.java |
| 2302 | * |
| 2303 | */ |
| 2304 | message BluetoothClassOfDeviceReported { |
| 2305 | // An identifier that can be used to match events for this device. |
| 2306 | // Currently, this is a salted hash of the MAC address of this Bluetooth device. |
| 2307 | // Salt: Randomly generated 256 bit value |
| 2308 | // Hash algorithm: HMAC-SHA256 |
| 2309 | // Size: 32 byte |
| 2310 | // Default: null or empty if this is a server listener socket |
| 2311 | optional bytes obfuscated_id = 1 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 2312 | // Class of Device (CoD) value including both Major, Minor device class and service class |
| 2313 | // Defined in: https://www.bluetooth.com/specifications/assigned-numbers/baseband |
| 2314 | // Also defined in: https://developer.android.com/reference/android/bluetooth/BluetoothClass |
| 2315 | // Default: 0 |
| 2316 | optional int32 class_of_device = 2; |
| 2317 | } |
| 2318 | |
| 2319 | /** |
Andrew Chant | 28d627e | 2018-02-22 15:17:05 -0800 | [diff] [blame] | 2320 | * Logs when something is plugged into or removed from the USB-C connector. |
| 2321 | * |
| 2322 | * Logged from: |
Badhri Jagan Sridharan | 223b3c7 | 2018-11-16 16:02:35 -0800 | [diff] [blame] | 2323 | * UsbService |
Andrew Chant | 28d627e | 2018-02-22 15:17:05 -0800 | [diff] [blame] | 2324 | */ |
| 2325 | message UsbConnectorStateChanged { |
| 2326 | enum State { |
Badhri Jagan Sridharan | 223b3c7 | 2018-11-16 16:02:35 -0800 | [diff] [blame] | 2327 | STATE_DISCONNECTED = 0; |
| 2328 | STATE_CONNECTED = 1; |
Andrew Chant | 28d627e | 2018-02-22 15:17:05 -0800 | [diff] [blame] | 2329 | } |
| 2330 | optional State state = 1; |
Badhri Jagan Sridharan | 223b3c7 | 2018-11-16 16:02:35 -0800 | [diff] [blame] | 2331 | optional string id = 2; |
Badhri Jagan Sridharan | faf6207 | 2018-11-16 17:17:03 -0800 | [diff] [blame] | 2332 | // Last active session in ms. |
| 2333 | // 0 when the port is in connected state. |
| 2334 | optional int64 last_connect_duration_millis = 3; |
Andrew Chant | 28d627e | 2018-02-22 15:17:05 -0800 | [diff] [blame] | 2335 | } |
| 2336 | |
| 2337 | /** |
| 2338 | * Logs the reported speaker impedance. |
| 2339 | * |
| 2340 | * Logged from: |
| 2341 | * Vendor audio implementation. |
| 2342 | */ |
| 2343 | message SpeakerImpedanceReported { |
| 2344 | optional int32 speaker_location = 1; |
| 2345 | optional int32 impedance = 2; |
| 2346 | } |
| 2347 | |
| 2348 | /** |
| 2349 | * Logs the report of a failed hardware. |
| 2350 | * |
| 2351 | * Logged from: |
| 2352 | * Vendor HALs. |
| 2353 | * |
| 2354 | */ |
| 2355 | message HardwareFailed { |
| 2356 | enum HardwareType { |
| 2357 | HARDWARE_FAILED_UNKNOWN = 0; |
| 2358 | HARDWARE_FAILED_MICROPHONE = 1; |
| 2359 | HARDWARE_FAILED_CODEC = 2; |
| 2360 | HARDWARE_FAILED_SPEAKER = 3; |
| 2361 | HARDWARE_FAILED_FINGERPRINT = 4; |
| 2362 | } |
| 2363 | optional HardwareType hardware_type = 1; |
| 2364 | |
Maggie White | 6dcd857 | 2019-01-31 14:11:50 -0800 | [diff] [blame] | 2365 | /** |
| 2366 | * hardware_location allows vendors to differentiate between multiple instances of |
Andrew Chant | 28d627e | 2018-02-22 15:17:05 -0800 | [diff] [blame] | 2367 | * the same hardware_type. The specific locations are vendor defined integers, |
| 2368 | * referring to board-specific numbering schemes. |
| 2369 | */ |
| 2370 | optional int32 hardware_location = 2; |
| 2371 | |
Maggie White | 6dcd857 | 2019-01-31 14:11:50 -0800 | [diff] [blame] | 2372 | /** |
| 2373 | * failure_code is specific to the HardwareType of the failed hardware. |
| 2374 | * It should use one of the enum values defined below. |
Andrew Chant | 28d627e | 2018-02-22 15:17:05 -0800 | [diff] [blame] | 2375 | */ |
Maggie White | 6dcd857 | 2019-01-31 14:11:50 -0800 | [diff] [blame] | 2376 | enum HardwareErrorCode { |
| 2377 | UNKNOWN = 0; |
| 2378 | COMPLETE = 1; |
| 2379 | SPEAKER_HIGH_Z = 2; |
| 2380 | SPEAKER_SHORT = 3; |
| 2381 | FINGERPRINT_SENSOR_BROKEN = 4; |
| 2382 | FINGERPRINT_TOO_MANY_DEAD_PIXELS = 5; |
Maggie White | b76cebc | 2019-02-05 15:21:29 -0800 | [diff] [blame] | 2383 | DEGRADE = 6; |
Andrew Chant | 28d627e | 2018-02-22 15:17:05 -0800 | [diff] [blame] | 2384 | } |
| 2385 | optional int32 failure_code = 3; |
| 2386 | } |
| 2387 | |
| 2388 | /** |
| 2389 | * Log an event when the device has been physically dropped. |
| 2390 | * Reported from the /vendor partition. |
| 2391 | */ |
| 2392 | message PhysicalDropDetected { |
| 2393 | // Confidence that the event was actually a drop, 0 -> 100 |
| 2394 | optional int32 confidence_pctg = 1; |
| 2395 | // Peak acceleration of the drop, in 1/1000s of a g. |
| 2396 | optional int32 accel_peak_thousandths_g = 2; |
Andrew Chant | b56388b | 2018-03-22 21:07:33 -0700 | [diff] [blame] | 2397 | // Duration of freefall in ms |
| 2398 | optional int32 freefall_time_millis = 3; |
Andrew Chant | 28d627e | 2018-02-22 15:17:05 -0800 | [diff] [blame] | 2399 | } |
| 2400 | |
| 2401 | /** |
| 2402 | * Log bucketed battery charge cycles. |
| 2403 | * |
| 2404 | * Each bucket represents cycles of the battery past |
Maggie White | 38c9d32 | 2018-11-20 10:07:52 -0800 | [diff] [blame] | 2405 | * a given charge point. For example, if 10 cycle buckets are |
| 2406 | * initialized, bucket 1 is the lowest 1/10th of the battery, |
| 2407 | * and bucket 10 is 100%. |
Andrew Chant | 28d627e | 2018-02-22 15:17:05 -0800 | [diff] [blame] | 2408 | * |
| 2409 | * Logged from: |
| 2410 | * /sys/class/power_supply/bms/cycle_count, via Vendor. |
| 2411 | */ |
| 2412 | message ChargeCyclesReported { |
| 2413 | optional int32 cycle_bucket_1 = 1; |
| 2414 | optional int32 cycle_bucket_2 = 2; |
| 2415 | optional int32 cycle_bucket_3 = 3; |
| 2416 | optional int32 cycle_bucket_4 = 4; |
| 2417 | optional int32 cycle_bucket_5 = 5; |
| 2418 | optional int32 cycle_bucket_6 = 6; |
| 2419 | optional int32 cycle_bucket_7 = 7; |
| 2420 | optional int32 cycle_bucket_8 = 8; |
Maggie White | 38c9d32 | 2018-11-20 10:07:52 -0800 | [diff] [blame] | 2421 | optional int32 cycle_bucket_9 = 9; |
| 2422 | optional int32 cycle_bucket_10 = 10; |
Andrew Chant | 28d627e | 2018-02-22 15:17:05 -0800 | [diff] [blame] | 2423 | } |
| 2424 | |
| 2425 | /** |
Howard Ro | a46b658 | 2018-09-18 16:45:02 -0700 | [diff] [blame] | 2426 | * Log battery health snapshot. |
| 2427 | * |
| 2428 | * Resistance, Voltage, Open Circuit Voltage, Temperature, and Charge Level |
| 2429 | * are snapshotted periodically over 24hrs. |
| 2430 | */ |
| 2431 | message BatteryHealthSnapshot { |
| 2432 | enum BatterySnapshotType { |
| 2433 | UNKNOWN = 0; |
| 2434 | MIN_TEMP = 1; // Snapshot at min batt temp over 24hrs. |
| 2435 | MAX_TEMP = 2; // Snapshot at max batt temp over 24hrs. |
| 2436 | MIN_RESISTANCE = 3; // Snapshot at min batt resistance over 24hrs. |
| 2437 | MAX_RESISTANCE = 4; // Snapshot at max batt resistance over 24hrs. |
| 2438 | MIN_VOLTAGE = 5; // Snapshot at min batt voltage over 24hrs. |
| 2439 | MAX_VOLTAGE = 6; // Snapshot at max batt voltage over 24hrs. |
| 2440 | MIN_CURRENT = 7; // Snapshot at min batt current over 24hrs. |
| 2441 | MAX_CURRENT = 8; // Snapshot at max batt current over 24hrs. |
| 2442 | MIN_BATT_LEVEL = 9; // Snapshot at min battery level (SoC) over 24hrs. |
| 2443 | MAX_BATT_LEVEL = 10; // Snapshot at max battery level (SoC) over 24hrs. |
| 2444 | AVG_RESISTANCE = 11; // Snapshot at average battery resistance over 24hrs. |
| 2445 | } |
| 2446 | optional BatterySnapshotType type = 1; |
| 2447 | // Temperature, in 1/10ths of degree C. |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 2448 | optional int32 temperature_deci_celsius = 2; |
Howard Ro | a46b658 | 2018-09-18 16:45:02 -0700 | [diff] [blame] | 2449 | // Voltage Battery Voltage, in microVolts. |
| 2450 | optional int32 voltage_micro_volt = 3; |
| 2451 | // Current Battery current, in microAmps. |
| 2452 | optional int32 current_micro_amps = 4; |
| 2453 | // OpenCircuitVoltage Battery Open Circuit Voltage, in microVolts. |
| 2454 | optional int32 open_circuit_micro_volt = 5; |
| 2455 | // Resistance Battery Resistance, in microOhms. |
| 2456 | optional int32 resistance_micro_ohm = 6; |
| 2457 | // Level Battery Level, as % of full. |
| 2458 | optional int32 level_percent = 7; |
| 2459 | } |
| 2460 | |
| 2461 | /** |
| 2462 | * Log slow I/O operations on the primary storage. |
| 2463 | */ |
| 2464 | message SlowIo { |
| 2465 | // Classifications of IO Operations. |
| 2466 | enum IoOperation { |
| 2467 | UNKNOWN = 0; |
| 2468 | READ = 1; |
| 2469 | WRITE = 2; |
| 2470 | UNMAP = 3; |
| 2471 | SYNC = 4; |
| 2472 | } |
| 2473 | optional IoOperation operation = 1; |
| 2474 | |
| 2475 | // The number of slow IO operations of this type over 24 hours. |
| 2476 | optional int32 count = 2; |
| 2477 | } |
| 2478 | |
| 2479 | /** |
| 2480 | * Log battery caused shutdown with the last recorded voltage. |
| 2481 | */ |
| 2482 | message BatteryCausedShutdown { |
| 2483 | // The last recorded battery voltage prior to shutdown. |
| 2484 | optional int32 last_recorded_micro_volt = 1; |
| 2485 | } |
| 2486 | |
| 2487 | /** |
Tej Singh | a7234499 | 2019-04-17 18:55:08 -0700 | [diff] [blame] | 2488 | * Logs when ThermalService receives throttling events. |
| 2489 | * |
| 2490 | * Logged from: |
| 2491 | * frameworks/base/services/core/java/com/android/server/stats/StatsCompanionService.java |
| 2492 | */ |
| 2493 | message ThermalThrottlingSeverityStateChanged { |
| 2494 | // The type of temperature being reported (CPU, GPU, SKIN, etc) |
| 2495 | optional android.os.TemperatureTypeEnum sensor_type = 1; |
| 2496 | |
| 2497 | // The name of the temperature source. Eg. CPU0 |
| 2498 | optional string sensor_name = 2; |
| 2499 | |
| 2500 | // Temperature in tenths of a degree C. |
| 2501 | // For BCL, it is decimillivolt, decimilliamps, and percentage * 10. |
| 2502 | optional int32 temperature_deci_celsius = 3; |
| 2503 | |
| 2504 | // Relative severity of the throttling, see enum definition. |
| 2505 | optional android.os.ThrottlingSeverityEnum severity = 4; |
| 2506 | } |
| 2507 | |
| 2508 | /** |
Tej Singh | bb8554a | 2018-01-26 11:59:14 -0800 | [diff] [blame] | 2509 | * Logs the duration of a davey (jank of >=700ms) when it occurs |
| 2510 | * |
| 2511 | * Logged from: |
| 2512 | * frameworks/base/libs/hwui/JankTracker.cpp |
| 2513 | */ |
| 2514 | message DaveyOccurred { |
David Chen | 77ef671 | 2018-02-23 18:23:42 -0800 | [diff] [blame] | 2515 | // The UID that logged this atom. |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 2516 | optional int32 uid = 1 [(is_uid) = true]; |
David Chen | 77ef671 | 2018-02-23 18:23:42 -0800 | [diff] [blame] | 2517 | |
Tej Singh | bb8554a | 2018-01-26 11:59:14 -0800 | [diff] [blame] | 2518 | // Amount of time it took to render the frame. Should be >=700ms. |
David Chen | 77ef671 | 2018-02-23 18:23:42 -0800 | [diff] [blame] | 2519 | optional int64 jank_duration_millis = 2; |
Tej Singh | bb8554a | 2018-01-26 11:59:14 -0800 | [diff] [blame] | 2520 | } |
| 2521 | |
| 2522 | /** |
Bookatz | e588524 | 2017-10-24 20:10:31 -0700 | [diff] [blame] | 2523 | * Logs phone signal strength changes. |
| 2524 | * |
| 2525 | * Logged from: |
David Chen | c28b2bb | 2017-10-24 12:52:52 -0700 | [diff] [blame] | 2526 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
Bookatz | e588524 | 2017-10-24 20:10:31 -0700 | [diff] [blame] | 2527 | */ |
| 2528 | message PhoneSignalStrengthChanged { |
Bookatz | 1a1b046 | 2018-01-12 11:47:03 -0800 | [diff] [blame] | 2529 | // Signal strength, from frameworks/base/core/proto/android/telephony/enums.proto. |
| 2530 | optional android.telephony.SignalStrengthEnum signal_strength = 1; |
David Chen | c28b2bb | 2017-10-24 12:52:52 -0700 | [diff] [blame] | 2531 | } |
| 2532 | |
Yangster | 4ccebea | 2018-10-09 17:09:02 -0700 | [diff] [blame] | 2533 | |
| 2534 | /** |
| 2535 | * Logs when the phone state, sim state or signal strength changes |
| 2536 | * |
| 2537 | * Logged from: |
| 2538 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
| 2539 | */ |
| 2540 | message PhoneServiceStateChanged { |
| 2541 | optional android.telephony.ServiceStateEnum state = 1; |
| 2542 | optional android.telephony.SimStateEnum sim_state = 2; |
| 2543 | optional android.telephony.SignalStrengthEnum signal_strength = 3; |
| 2544 | } |
| 2545 | |
| 2546 | /** |
| 2547 | * Logs when the phone becomes on or off. |
| 2548 | * |
| 2549 | * Logged from: |
| 2550 | * frameworks/base/core/java/com/android/internal/os/TelephonyRegistry.java |
| 2551 | */ |
| 2552 | message PhoneStateChanged { |
| 2553 | enum State { |
| 2554 | OFF = 0; |
| 2555 | ON = 1; |
| 2556 | } |
| 2557 | optional State state = 1; |
| 2558 | } |
| 2559 | |
Hyunyoung Song | 2ecb886 | 2019-07-09 09:19:25 -0700 | [diff] [blame] | 2560 | message BackGesture { |
| 2561 | enum BackType { |
| 2562 | DEFAULT_BACK_TYPE = 0; |
| 2563 | COMPLETED = 1; |
| 2564 | COMPLETED_REJECTED = 2; // successful because coming from rejected area |
| 2565 | INCOMPLETE_EXCLUDED = 3; // would have been successful but in the exclusion area |
| 2566 | INCOMPLETE = 4; |
| 2567 | } |
| 2568 | optional BackType type = 1; |
| 2569 | |
| 2570 | optional int32 y_coordinate = 2; // y coordinate for ACTION_DOWN event |
| 2571 | enum WindowHorizontalLocation { |
| 2572 | DEFAULT_LOCATION = 0; |
| 2573 | LEFT = 1; |
| 2574 | RIGHT = 2; |
| 2575 | } |
| 2576 | optional WindowHorizontalLocation x_location = 3; |
| 2577 | } |
| 2578 | |
| 2579 | message ExclusionRectStateChanged { |
| 2580 | optional string component_name = 1; // if not available, simply packageName |
| 2581 | optional int32 requested_height = 2; // px |
| 2582 | optional int32 rejected_height = 3; // px |
| 2583 | |
| 2584 | enum WindowHorizontalLocation { |
| 2585 | DEFAULT_LOCATION = 0; |
| 2586 | LEFT = 1; |
| 2587 | RIGHT = 2; |
| 2588 | } |
| 2589 | optional WindowHorizontalLocation x_location = 4; |
| 2590 | optional bool landscape = 5; |
| 2591 | optional bool splitscreen = 6; |
| 2592 | optional int32 duration_millis = 7; |
| 2593 | } |
| 2594 | |
Hyunyoung Song | c6d6b77 | 2018-10-17 13:35:32 -0700 | [diff] [blame] | 2595 | message LauncherUIChanged { |
Yao Chen | 8c43386 | 2018-10-24 14:09:20 -0700 | [diff] [blame] | 2596 | optional android.stats.launcher.LauncherAction action = 1; |
| 2597 | optional android.stats.launcher.LauncherState src_state = 2; |
| 2598 | optional android.stats.launcher.LauncherState dst_state = 3; |
| 2599 | optional android.stats.launcher.LauncherExtension extension = 4 [(log_mode) = MODE_BYTES]; |
Hyunyoung Song | c6d6b77 | 2018-10-17 13:35:32 -0700 | [diff] [blame] | 2600 | optional bool is_swipe_up_enabled = 5; |
| 2601 | } |
| 2602 | |
Hyunyoung Song | 80adf6be | 2019-01-30 09:59:30 -0800 | [diff] [blame] | 2603 | message StyleUIChanged { |
| 2604 | optional android.stats.style.Action action = 1; |
| 2605 | optional int32 color_package_hash = 2; |
| 2606 | optional int32 font_package_hash = 3; |
| 2607 | optional int32 shape_package_hash = 4; |
| 2608 | optional int32 clock_package_hash = 5; |
| 2609 | optional int32 launcher_grid = 6; |
| 2610 | optional int32 wallpaper_category_hash = 7; |
| 2611 | optional int32 wallpaper_id_hash = 8; |
Kunhung Li | 286c52f | 2019-05-21 20:10:43 +0800 | [diff] [blame] | 2612 | optional int32 color_preference = 9; |
| 2613 | optional android.stats.style.LocationPreference location_preference = 10; |
Hyunyoung Song | 80adf6be | 2019-01-30 09:59:30 -0800 | [diff] [blame] | 2614 | } |
| 2615 | |
David Chen | c28b2bb | 2017-10-24 12:52:52 -0700 | [diff] [blame] | 2616 | /** |
Fan Zhang | 916c13b | 2018-10-16 22:49:45 -0700 | [diff] [blame] | 2617 | * Logs when Settings UI has changed. |
| 2618 | * |
| 2619 | * Logged from: |
| 2620 | * packages/apps/Settings |
| 2621 | */ |
| 2622 | message SettingsUIChanged { |
| 2623 | /** |
Fan Zhang | 916c13b | 2018-10-16 22:49:45 -0700 | [diff] [blame] | 2624 | * Where this SettingsUIChange event comes from. For example, if |
| 2625 | * it's a PAGE_VISIBLE event, where the page is opened from. |
| 2626 | */ |
Fan Zhang | f837b8e | 2018-10-23 12:38:30 -0700 | [diff] [blame] | 2627 | optional android.app.settings.PageId attribution = 1; |
Fan Zhang | 916c13b | 2018-10-16 22:49:45 -0700 | [diff] [blame] | 2628 | |
| 2629 | /** |
| 2630 | * What the UI action is. |
| 2631 | */ |
Fan Zhang | f837b8e | 2018-10-23 12:38:30 -0700 | [diff] [blame] | 2632 | optional android.app.settings.Action action = 2; |
Fan Zhang | 916c13b | 2018-10-16 22:49:45 -0700 | [diff] [blame] | 2633 | |
| 2634 | /** |
| 2635 | * Where the action is happening |
| 2636 | */ |
Fan Zhang | ff2332b | 2018-12-06 15:16:41 -0800 | [diff] [blame] | 2637 | optional android.app.settings.PageId page_id = 3; |
Fan Zhang | 916c13b | 2018-10-16 22:49:45 -0700 | [diff] [blame] | 2638 | |
| 2639 | /** |
| 2640 | * What preference changed in this event. |
| 2641 | */ |
Fan Zhang | ff2332b | 2018-12-06 15:16:41 -0800 | [diff] [blame] | 2642 | optional string changed_preference_key = 4; |
Fan Zhang | 916c13b | 2018-10-16 22:49:45 -0700 | [diff] [blame] | 2643 | |
| 2644 | /** |
| 2645 | * The new value of the changed preference. |
| 2646 | */ |
Fan Zhang | ff2332b | 2018-12-06 15:16:41 -0800 | [diff] [blame] | 2647 | optional int64 changed_preference_int_value = 5; |
Fan Zhang | 916c13b | 2018-10-16 22:49:45 -0700 | [diff] [blame] | 2648 | } |
| 2649 | |
| 2650 | /** |
Siarhei Vishniakou | 3ddecff | 2018-11-08 19:57:13 -0800 | [diff] [blame] | 2651 | * Logs basic timing information about touch events. |
| 2652 | * Reported at most every 5 minutes while device is being interacted with. |
| 2653 | * |
| 2654 | * Logged from: |
| 2655 | * frameworks/native/services/inputflinger |
| 2656 | */ |
| 2657 | message TouchEventReported { |
| 2658 | /** |
| 2659 | * The fields latency_{min|max|mean|stdev} represent minimum, maximum, mean, |
Siarhei Vishniakou | 20d23c0 | 2019-08-15 19:32:34 -0500 | [diff] [blame] | 2660 | * and the standard deviation of the time spent processing touchscreen events |
| 2661 | * in the kernel and inputflinger. The units are microseconds. |
Siarhei Vishniakou | 3ddecff | 2018-11-08 19:57:13 -0800 | [diff] [blame] | 2662 | * |
Siarhei Vishniakou | 20d23c0 | 2019-08-15 19:32:34 -0500 | [diff] [blame] | 2663 | * On supported devices, the starting point is taken during the hard interrupt inside the |
| 2664 | * kernel touch driver. On all other devices, the starting point is taken inside |
| 2665 | * the kernel's input event subsystem upon receipt of the input event. |
| 2666 | * The ending point is taken inside InputDispatcher, just after the input event |
| 2667 | * is sent to the app. |
Siarhei Vishniakou | 3ddecff | 2018-11-08 19:57:13 -0800 | [diff] [blame] | 2668 | */ |
| 2669 | // Minimum value |
| 2670 | optional float latency_min_micros = 1; |
| 2671 | // Maximum value |
| 2672 | optional float latency_max_micros = 2; |
| 2673 | // Average value |
| 2674 | optional float latency_mean_micros = 3; |
| 2675 | // Standard deviation |
| 2676 | optional float latency_stdev_micros = 4; |
Siarhei Vishniakou | ca954f9 | 2019-03-22 16:41:14 -0700 | [diff] [blame] | 2677 | // Number of touch events (input_event) in this report |
| 2678 | optional int32 count = 5; |
Siarhei Vishniakou | 3ddecff | 2018-11-08 19:57:13 -0800 | [diff] [blame] | 2679 | } |
| 2680 | |
| 2681 | /** |
Philip Quinn | 0eded62 | 2019-01-29 12:46:28 -0800 | [diff] [blame] | 2682 | * Logs gesture classification and timing information for touch events. |
| 2683 | * |
| 2684 | * Logged from: |
| 2685 | * frameworks/base/core/java/android/view/GestureDetector.java |
| 2686 | * frameworks/base/core/java/android/view/View.java |
| 2687 | */ |
| 2688 | message TouchGestureClassified { |
| 2689 | // The source of the classification (e.g. Java class name). |
| 2690 | optional string source = 1; |
| 2691 | |
| 2692 | enum Classification { |
| 2693 | UNKNOWN_CLASSIFICATION = 0; |
| 2694 | SINGLE_TAP = 1; |
| 2695 | DOUBLE_TAP = 2; |
| 2696 | LONG_PRESS = 3; |
| 2697 | DEEP_PRESS = 4; |
| 2698 | SCROLL = 5; |
| 2699 | } |
| 2700 | // The classification of the gesture. |
| 2701 | optional Classification classification = 2; |
| 2702 | |
| 2703 | // The interval from the start of a touch event stream until the |
| 2704 | // classification was made. |
| 2705 | optional int32 latency_millis = 3; |
| 2706 | |
| 2707 | // The distance from the location of the first touch event to the |
| 2708 | // location of the touch event when the classification was made. |
| 2709 | optional float displacement_px = 4; |
| 2710 | } |
| 2711 | |
| 2712 | /** |
David Chen | c28b2bb | 2017-10-24 12:52:52 -0700 | [diff] [blame] | 2713 | * Logs that a setting was updated. |
| 2714 | * Logged from: |
David Chen | bd78991 | 2018-03-16 17:19:55 -0700 | [diff] [blame] | 2715 | * frameworks/base/packages/SettingsProvider/src/com/android/providers/settings/SettingsState.java |
David Chen | c28b2bb | 2017-10-24 12:52:52 -0700 | [diff] [blame] | 2716 | * The tag and is_default allow resetting of settings to default values based on the specified |
| 2717 | * tag. See Settings#putString(ContentResolver, String, String, String, boolean) for more details. |
| 2718 | */ |
| 2719 | message SettingChanged { |
| 2720 | // The name of the setting. |
| 2721 | optional string setting = 1; |
| 2722 | |
| 2723 | // The change being imposed on this setting. May represent a number, eg "3". |
| 2724 | optional string value = 2; |
| 2725 | |
| 2726 | // The new value of this setting. For most settings, this is same as value. For some settings, |
| 2727 | // value is +X or -X where X represents an element in a set. For example, if the previous value |
| 2728 | // is A,B,C and value is -B, then new_value is A,C and prev_value is A,B,C. |
| 2729 | // The +/- feature is currently only used for location_providers_allowed. |
| 2730 | optional string new_value = 3; |
| 2731 | |
| 2732 | // The previous value of this setting. |
| 2733 | optional string prev_value = 4; |
| 2734 | |
| 2735 | // The tag used with the is_default for resetting sets of settings. This is generally null. |
| 2736 | optional string tag = 5; |
| 2737 | |
Bookatz | 9086762 | 2018-01-31 15:05:57 -0800 | [diff] [blame] | 2738 | // True if this setting with tag should be resettable. |
| 2739 | optional bool is_default = 6; |
David Chen | c28b2bb | 2017-10-24 12:52:52 -0700 | [diff] [blame] | 2740 | |
David Chen | bd78991 | 2018-03-16 17:19:55 -0700 | [diff] [blame] | 2741 | // 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] | 2742 | optional int32 user = 7; |
David Chen | bd78991 | 2018-03-16 17:19:55 -0700 | [diff] [blame] | 2743 | |
| 2744 | enum ChangeReason { |
| 2745 | UPDATED = 1; // Updated can be an insertion or an update. |
| 2746 | DELETED = 2; |
| 2747 | } |
| 2748 | optional ChangeReason reason = 8; |
David Chen | c28b2bb | 2017-10-24 12:52:52 -0700 | [diff] [blame] | 2749 | } |
Chenjie Yu | b3dda41 | 2017-10-24 13:41:59 -0700 | [diff] [blame] | 2750 | |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 2751 | /** |
Chenjie Yu | 3d4f604 | 2017-10-27 15:39:34 -0700 | [diff] [blame] | 2752 | * Logs activity going to foreground or background |
| 2753 | * |
| 2754 | * Logged from: |
| 2755 | * frameworks/base/services/core/java/com/android/server/am/ActivityRecord.java |
| 2756 | */ |
| 2757 | message ActivityForegroundStateChanged { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 2758 | optional int32 uid = 1 [(is_uid) = true]; |
Yangster-mac | 2087716 | 2017-12-22 17:19:39 -0800 | [diff] [blame] | 2759 | optional string pkg_name = 2; |
| 2760 | optional string class_name = 3; |
| 2761 | |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 2762 | enum State { |
| 2763 | BACKGROUND = 0; |
| 2764 | FOREGROUND = 1; |
Chenjie Yu | 3d4f604 | 2017-10-27 15:39:34 -0700 | [diff] [blame] | 2765 | } |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 2766 | optional State state = 4; |
Chenjie Yu | 3d4f604 | 2017-10-27 15:39:34 -0700 | [diff] [blame] | 2767 | } |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 2768 | |
| 2769 | /** |
Felix Lopez Luis | d95346a | 2018-12-12 10:32:32 +0000 | [diff] [blame] | 2770 | * Logs when a volume entered low Storage state. |
| 2771 | * Logged from: |
| 2772 | * frameworks/base/services/core/java/com/android/server/storage/DeviceStorageMonitorService.java |
| 2773 | */ |
| 2774 | message LowStorageStateChanged { |
| 2775 | // Volume that ran out of storage. |
| 2776 | optional string volume_description = 1; |
| 2777 | |
| 2778 | enum State { |
| 2779 | UNKNOWN = 0; |
| 2780 | OFF = 1; |
| 2781 | ON = 2; |
| 2782 | } |
| 2783 | optional State state = 2; |
| 2784 | } |
| 2785 | |
| 2786 | /** |
| 2787 | * Logs when an app is downgraded. |
| 2788 | * Logged from: |
| 2789 | * frameworks/base/services/core/java/com/android/server/pm/BackgroundDexOptService.java |
| 2790 | */ |
| 2791 | message AppDowngraded { |
| 2792 | optional string package_name = 1; |
| 2793 | // Size of the package (all data) before being downgraded. |
| 2794 | optional int64 size_in_bytes_before = 2; |
| 2795 | // Size of the package (all data) after being downgraded. |
| 2796 | optional int64 size_in_bytes_after = 3; |
| 2797 | |
| 2798 | optional bool aggressive = 4; |
| 2799 | } |
| 2800 | |
| 2801 | /** |
| 2802 | * Logs when an app is optimized after being downgraded. |
| 2803 | * Logged from: |
| 2804 | * frameworks/base/services/core/java/com/android/server/pm/BackgroundDexOptService.java |
| 2805 | */ |
| 2806 | message AppOptimizedAfterDowngraded { |
| 2807 | optional string package_name = 1; |
| 2808 | } |
| 2809 | |
| 2810 | /** |
Carmen Agimof | 6688a35 | 2019-01-30 19:36:04 +0000 | [diff] [blame] | 2811 | * Logs whenever an app is installed on external storage. |
| 2812 | * Logged from: |
| 2813 | frameworks/base/services/core/java/com/android/server/pm/PackageManagerService.java |
| 2814 | */ |
| 2815 | message AppInstallOnExternalStorageReported { |
| 2816 | // The type of external storage. |
| 2817 | optional android.stats.storage.ExternalStorageType storage_type = 1; |
| 2818 | // The name of the package that is installed on the sd card. |
| 2819 | optional string package_name = 2; |
| 2820 | } |
| 2821 | |
| 2822 | /** |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 2823 | * Logs when an app crashes. |
David Chen | 9e3808c | 2017-11-20 17:25:34 -0800 | [diff] [blame] | 2824 | * Logged from: |
| 2825 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
| 2826 | */ |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 2827 | message AppCrashOccurred { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 2828 | optional int32 uid = 1 [(is_uid) = true]; |
David Chen | 9e3808c | 2017-11-20 17:25:34 -0800 | [diff] [blame] | 2829 | |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 2830 | optional string event_type = 2; |
David Chen | 9e3808c | 2017-11-20 17:25:34 -0800 | [diff] [blame] | 2831 | |
| 2832 | // The name of the process. |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 2833 | // system_server if it is not by an app |
David Chen | 9e3808c | 2017-11-20 17:25:34 -0800 | [diff] [blame] | 2834 | optional string process_name = 3; |
| 2835 | |
| 2836 | // The pid if available. -1 means not available. |
David Chen | 6e3e6cb | 2018-01-03 16:14:06 -0800 | [diff] [blame] | 2837 | optional sint32 pid = 4; |
Chenjie Yu | f17bf62f | 2018-04-02 14:22:19 -0700 | [diff] [blame] | 2838 | |
| 2839 | optional string package_name = 5; |
| 2840 | |
| 2841 | enum InstantApp { |
| 2842 | UNAVAILABLE = 0; |
| 2843 | FALSE = 1; |
| 2844 | TRUE = 2; |
| 2845 | } |
| 2846 | optional InstantApp is_instant_app = 6; |
| 2847 | |
| 2848 | enum ForegroundState { |
| 2849 | UNKNOWN = 0; |
| 2850 | BACKGROUND = 1; |
| 2851 | FOREGROUND = 2; |
| 2852 | } |
| 2853 | optional ForegroundState foreground_state = 7; |
Yang Lu | 732d638 | 2018-11-05 07:53:12 -0800 | [diff] [blame] | 2854 | |
| 2855 | optional android.server.ErrorSource error_source = 8; |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 2856 | } |
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 | /** |
| 2859 | * Logs when a WTF (What a Terrible Failure) happened. |
| 2860 | * Logged from: |
| 2861 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
| 2862 | */ |
| 2863 | message WTFOccurred { |
| 2864 | optional int32 uid = 1 [(is_uid) = true]; |
David Chen | 9e3808c | 2017-11-20 17:25:34 -0800 | [diff] [blame] | 2865 | |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 2866 | optional string tag = 2; |
David Chen | 9e3808c | 2017-11-20 17:25:34 -0800 | [diff] [blame] | 2867 | |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 2868 | // The name of the process. |
| 2869 | // system_server if it is not by an app |
| 2870 | optional string process_name = 3; |
David Chen | 6e3e6cb | 2018-01-03 16:14:06 -0800 | [diff] [blame] | 2871 | |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 2872 | // The pid if available. -1 means not available. |
| 2873 | optional sint32 pid = 4; |
Yang Lu | 732d638 | 2018-11-05 07:53:12 -0800 | [diff] [blame] | 2874 | |
| 2875 | optional android.server.ErrorSource error_source = 5; |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 2876 | } |
| 2877 | |
| 2878 | /** |
| 2879 | * Logs when system server reports low memory. |
| 2880 | * Logged from: |
| 2881 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
| 2882 | */ |
| 2883 | message LowMemReported { |
| 2884 | } |
| 2885 | |
| 2886 | /** |
| 2887 | * Logs when an app ANR (App Not Responding) occurs. |
| 2888 | * Logged from: |
| 2889 | * frameworks/base/services/core/java/com/android/server/am/AppErrors.java |
| 2890 | */ |
| 2891 | message ANROccurred { |
| 2892 | optional int32 uid = 1 [(is_uid) = true]; |
| 2893 | |
| 2894 | optional string process_name = 2; |
| 2895 | |
| 2896 | optional string short_component_name = 3; |
| 2897 | |
| 2898 | optional string reason = 4; |
Chenjie Yu | f17bf62f | 2018-04-02 14:22:19 -0700 | [diff] [blame] | 2899 | |
| 2900 | enum InstantApp { |
| 2901 | UNAVAILABLE = 0; |
| 2902 | FALSE = 1; |
| 2903 | TRUE = 2; |
| 2904 | } |
| 2905 | optional InstantApp is_instant_app = 5; |
| 2906 | |
| 2907 | enum ForegroundState { |
| 2908 | UNKNOWN = 0; |
| 2909 | BACKGROUND = 1; |
| 2910 | FOREGROUND = 2; |
| 2911 | } |
| 2912 | optional ForegroundState foreground_state = 6; |
Yang Lu | 732d638 | 2018-11-05 07:53:12 -0800 | [diff] [blame] | 2913 | |
| 2914 | optional android.server.ErrorSource error_source = 7; |
| 2915 | |
| 2916 | optional string package_name = 8; |
David Chen | 9e3808c | 2017-11-20 17:25:34 -0800 | [diff] [blame] | 2917 | } |
| 2918 | |
Bookatz | a7020bd | 2018-08-28 16:29:35 -0700 | [diff] [blame] | 2919 | /** |
| 2920 | * Logs when the vibrator state changes. |
| 2921 | * Logged from: |
| 2922 | * frameworks/base/services/core/java/com/android/server/VibratorService.java |
| 2923 | */ |
| 2924 | message VibratorStateChanged { |
| 2925 | repeated AttributionNode attribution_node = 1; |
| 2926 | |
| 2927 | enum State { |
| 2928 | OFF = 0; |
| 2929 | ON = 1; |
| 2930 | } |
| 2931 | optional State state = 2; |
| 2932 | |
| 2933 | // Duration (in milliseconds) requested to keep the vibrator on. |
| 2934 | // Only applicable for State == ON. |
| 2935 | optional int64 duration_millis = 3; |
| 2936 | } |
| 2937 | |
David Chen | 0a368b2 | 2017-12-06 16:28:16 -0800 | [diff] [blame] | 2938 | /* |
| 2939 | * Allows other apps to push events into statsd. |
| 2940 | * Logged from: |
| 2941 | * frameworks/base/core/java/android/util/StatsLog.java |
| 2942 | */ |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 2943 | message AppBreadcrumbReported { |
David Chen | 0a368b2 | 2017-12-06 16:28:16 -0800 | [diff] [blame] | 2944 | // The uid of the application that sent this custom atom. |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 2945 | optional int32 uid = 1 [(is_uid) = true]; |
David Chen | 0a368b2 | 2017-12-06 16:28:16 -0800 | [diff] [blame] | 2946 | |
| 2947 | // An arbitrary label chosen by the developer. For Android P, the label should be in [0, 16). |
| 2948 | optional int32 label = 2; |
| 2949 | |
| 2950 | // Allows applications to easily use a custom event as start/stop boundaries (ie, define custom |
| 2951 | // predicates for the metrics). |
| 2952 | enum State { |
| 2953 | UNKNOWN = 0; |
| 2954 | UNSPECIFIED = 1; // For events that are known to not represent START/STOP. |
| 2955 | STOP = 2; |
| 2956 | START = 3; |
| 2957 | } |
| 2958 | optional State state = 3; |
| 2959 | } |
| 2960 | |
David Chen | 9e3808c | 2017-11-20 17:25:34 -0800 | [diff] [blame] | 2961 | /** |
Bookatz | 7948c87 | 2018-09-04 12:58:33 -0700 | [diff] [blame] | 2962 | * Logs the wall-clock time when a significant wall-clock time shift occurs. |
| 2963 | * For example, this could be due to the user manually changing the time. |
| 2964 | * |
| 2965 | * Logged from: |
| 2966 | * frameworks/base/services/core/java/com/android/server/AlarmManagerService.java |
| 2967 | */ |
| 2968 | message WallClockTimeShifted { |
| 2969 | // New wall-clock time in milliseconds, according to System.currentTimeMillis(). |
| 2970 | optional int64 wall_clock_timestamp_millis = 1; |
| 2971 | } |
| 2972 | |
| 2973 | /** |
Bookatz | 8fcd09a | 2017-12-18 13:01:10 -0800 | [diff] [blame] | 2974 | * Logs when statsd detects an anomaly. |
| 2975 | * |
| 2976 | * Logged from: |
| 2977 | * frameworks/base/cmds/statsd/src/anomaly/AnomalyTracker.cpp |
| 2978 | */ |
| 2979 | message AnomalyDetected { |
| 2980 | // Uid that owns the config whose anomaly detection alert fired. |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 2981 | optional int32 config_uid = 1 [(is_uid) = true]; |
Bookatz | 8fcd09a | 2017-12-18 13:01:10 -0800 | [diff] [blame] | 2982 | |
Yangster-mac | 94e197c | 2018-01-02 16:03:03 -0800 | [diff] [blame] | 2983 | // Id of the config whose anomaly detection alert fired. |
| 2984 | optional int64 config_id = 2; |
Bookatz | 8fcd09a | 2017-12-18 13:01:10 -0800 | [diff] [blame] | 2985 | |
Yangster-mac | 94e197c | 2018-01-02 16:03:03 -0800 | [diff] [blame] | 2986 | // Id of the alert (i.e. name of the anomaly that was detected). |
| 2987 | optional int64 alert_id = 3; |
Bookatz | 8fcd09a | 2017-12-18 13:01:10 -0800 | [diff] [blame] | 2988 | } |
| 2989 | |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 2990 | message AppStartOccurred { |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 2991 | // The uid if available. -1 means not available. |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 2992 | optional int32 uid = 1 [(is_uid) = true]; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 2993 | |
| 2994 | // The app package name. |
| 2995 | optional string pkg_name = 2; |
| 2996 | |
| 2997 | enum TransitionType { |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 2998 | UNKNOWN = 0; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 2999 | WARM = 1; |
| 3000 | HOT = 2; |
| 3001 | COLD = 3; |
| 3002 | } |
| 3003 | // The transition type. |
| 3004 | optional TransitionType type = 3; |
| 3005 | |
| 3006 | // The activity name. |
| 3007 | optional string activity_name = 4; |
| 3008 | |
| 3009 | // The name of the calling app. Empty if not set. |
| 3010 | optional string calling_pkg_name = 5; |
| 3011 | |
| 3012 | // Whether the app is an instant app. |
| 3013 | optional bool is_instant_app = 6; |
| 3014 | |
| 3015 | // Device uptime when activity started. |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 3016 | optional int64 activity_start_millis = 7; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 3017 | |
Bookatz | 80d11a0 | 2018-01-16 10:46:35 -0800 | [diff] [blame] | 3018 | optional android.app.AppTransitionReasonEnum reason = 8; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 3019 | |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 3020 | optional int32 transition_delay_millis = 9; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 3021 | // -1 if not set. |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 3022 | optional int32 starting_window_delay_millis = 10; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 3023 | // -1 if not set. |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 3024 | optional int32 bind_application_delay_millis = 11; |
| 3025 | optional int32 windows_drawn_delay_millis = 12; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 3026 | |
| 3027 | // Empty if not set. |
| 3028 | optional string launch_token = 13; |
| 3029 | |
Calin Juravle | 759fbda | 2018-02-20 19:52:30 +0000 | [diff] [blame] | 3030 | // The compiler filter used when when the package was optimized. |
Calin Juravle | a86783b | 2018-03-21 14:25:59 -0700 | [diff] [blame] | 3031 | optional int32 package_optimization_compilation_filter = 14; |
Calin Juravle | 759fbda | 2018-02-20 19:52:30 +0000 | [diff] [blame] | 3032 | |
| 3033 | // The reason why the package was optimized. |
Calin Juravle | a86783b | 2018-03-21 14:25:59 -0700 | [diff] [blame] | 3034 | optional int32 package_optimization_compilation_reason = 15; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 3035 | } |
| 3036 | |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 3037 | message AppStartCanceled { |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 3038 | // The uid if available. -1 means not available. |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 3039 | optional int32 uid = 1 [(is_uid) = true]; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 3040 | |
| 3041 | // The app package name. |
| 3042 | optional string pkg_name = 2; |
| 3043 | |
| 3044 | enum TransitionType { |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 3045 | UNKNOWN = 0; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 3046 | WARM = 1; |
| 3047 | HOT = 2; |
| 3048 | COLD = 3; |
| 3049 | } |
| 3050 | // The transition type. |
| 3051 | optional TransitionType type = 3; |
| 3052 | |
| 3053 | // The activity name. |
| 3054 | optional string activity_name = 4; |
| 3055 | } |
| 3056 | |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 3057 | message AppStartFullyDrawn { |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 3058 | // The uid if available. -1 means not available. |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 3059 | optional int32 uid = 1 [(is_uid) = true]; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 3060 | |
| 3061 | // The app package name. |
| 3062 | optional string pkg_name = 2; |
| 3063 | |
| 3064 | enum TransitionType { |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 3065 | UNKNOWN = 0; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 3066 | WITH_BUNDLE = 1; |
| 3067 | WITHOUT_BUNDLE = 2; |
| 3068 | } |
| 3069 | // The transition type. |
| 3070 | optional TransitionType type = 3; |
| 3071 | |
| 3072 | // The activity name. |
| 3073 | optional string activity_name = 4; |
| 3074 | |
| 3075 | optional bool transition_process_running = 5; |
| 3076 | |
| 3077 | // App startup time (until call to Activity#reportFullyDrawn()). |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 3078 | optional int64 app_startup_time_millis = 6; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 3079 | } |
| 3080 | |
Bookatz | 8fcd09a | 2017-12-18 13:01:10 -0800 | [diff] [blame] | 3081 | /** |
Chenjie Yu | 52cacc6 | 2017-12-08 18:11:45 -0800 | [diff] [blame] | 3082 | * Logs a picture-in-picture action |
| 3083 | * Logged from: |
| 3084 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
| 3085 | * frameworks/base/services/core/java/com/android/server/am/ActivityStackSupervisor.java |
| 3086 | * frameworks/base/packages/SystemUI/src/com/android/systemui/pip/phone/PipTouchHandler.java |
| 3087 | */ |
| 3088 | message PictureInPictureStateChanged { |
Chenjie Yu | ae9fdf04 | 2018-02-15 10:19:32 -0800 | [diff] [blame] | 3089 | // -1 if it is not available |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 3090 | optional int32 uid = 1 [(is_uid) = true]; |
Chenjie Yu | 52cacc6 | 2017-12-08 18:11:45 -0800 | [diff] [blame] | 3091 | |
Chenjie Yu | ae9fdf04 | 2018-02-15 10:19:32 -0800 | [diff] [blame] | 3092 | optional string short_name = 2; |
Chenjie Yu | 52cacc6 | 2017-12-08 18:11:45 -0800 | [diff] [blame] | 3093 | |
Chenjie Yu | 52cacc6 | 2017-12-08 18:11:45 -0800 | [diff] [blame] | 3094 | enum State { |
| 3095 | ENTERED = 1; |
| 3096 | EXPANDED_TO_FULL_SCREEN = 2; |
| 3097 | MINIMIZED = 3; |
| 3098 | DISMISSED = 4; |
| 3099 | } |
Chenjie Yu | ae9fdf04 | 2018-02-15 10:19:32 -0800 | [diff] [blame] | 3100 | optional State state = 3; |
Chenjie Yu | 52cacc6 | 2017-12-08 18:11:45 -0800 | [diff] [blame] | 3101 | } |
| 3102 | |
| 3103 | /** |
Chenjie Yu | e890419 | 2017-12-08 19:12:57 -0800 | [diff] [blame] | 3104 | * Logs overlay action |
| 3105 | * Logged from: |
| 3106 | * services/core/java/com/android/server/wm/Session.java |
| 3107 | */ |
| 3108 | message OverlayStateChanged { |
tsaichristine | 1097864 | 2019-09-10 14:12:49 -0700 | [diff] [blame] | 3109 | optional int32 uid = 1 [(state_field_option).option = PRIMARY, (is_uid) = true]; |
Chenjie Yu | e890419 | 2017-12-08 19:12:57 -0800 | [diff] [blame] | 3110 | |
tsaichristine | 1097864 | 2019-09-10 14:12:49 -0700 | [diff] [blame] | 3111 | optional string package_name = 2 [(state_field_option).option = PRIMARY]; |
Chenjie Yu | e890419 | 2017-12-08 19:12:57 -0800 | [diff] [blame] | 3112 | |
| 3113 | optional bool using_alert_window = 3; |
| 3114 | |
| 3115 | enum State { |
| 3116 | ENTERED = 1; |
| 3117 | EXITED = 2; |
| 3118 | } |
tsaichristine | 1097864 | 2019-09-10 14:12:49 -0700 | [diff] [blame] | 3119 | optional State state = 4 [(state_field_option).option = EXCLUSIVE]; |
Chenjie Yu | e890419 | 2017-12-08 19:12:57 -0800 | [diff] [blame] | 3120 | } |
| 3121 | |
Chenjie Yu | ccfe645 | 2018-01-30 11:33:21 -0800 | [diff] [blame] | 3122 | /* |
| 3123 | * Logs foreground service starts and stops. |
| 3124 | * Note that this is not when a service starts or stops, but when it is |
| 3125 | * considered foreground. |
| 3126 | * Logged from |
| 3127 | * //frameworks/base/services/core/java/com/android/server/am/ActiveServices.java |
| 3128 | */ |
| 3129 | message ForegroundServiceStateChanged { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 3130 | optional int32 uid = 1 [(is_uid) = true]; |
Chenjie Yu | ccfe645 | 2018-01-30 11:33:21 -0800 | [diff] [blame] | 3131 | // package_name + "/" + class_name |
| 3132 | optional string short_name = 2; |
| 3133 | |
| 3134 | enum State { |
| 3135 | ENTER = 1; |
| 3136 | EXIT = 2; |
| 3137 | } |
| 3138 | optional State state = 3; |
| 3139 | } |
| 3140 | |
Chenjie Yu | e890419 | 2017-12-08 19:12:57 -0800 | [diff] [blame] | 3141 | /** |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 3142 | * Logs creation or removal of an isolated uid. Isolated uid's are temporary uid's to sandbox risky |
| 3143 | * behavior in its own uid. However, the metrics of these isolated uid's almost always should be |
| 3144 | * attributed back to the parent (host) uid. One example is Chrome. |
| 3145 | * |
| 3146 | * Logged from: |
| 3147 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
| 3148 | */ |
| 3149 | message IsolatedUidChanged { |
| 3150 | // 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] | 3151 | // 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] | 3152 | // This field is ignored when event == REMOVED. |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 3153 | optional int32 parent_uid = 1; |
| 3154 | |
| 3155 | optional int32 isolated_uid = 2; |
| 3156 | |
| 3157 | // We expect an isolated uid to be removed before if it's used for another parent uid. |
| 3158 | enum Event { |
| 3159 | REMOVED = 0; |
| 3160 | CREATED = 1; |
| 3161 | } |
| 3162 | optional Event event = 3; |
| 3163 | } |
| 3164 | |
| 3165 | /* |
| 3166 | * Logs the reception of an incoming network packet causing the main system to wake up for |
| 3167 | * processing that packet. These events are notified by the kernel via Netlink NFLOG to Netd |
| 3168 | * and processed by WakeupController.cpp. |
| 3169 | */ |
| 3170 | message PacketWakeupOccurred { |
| 3171 | // The uid owning the socket into which the packet was delivered, or -1 if the packet was |
| 3172 | // delivered nowhere. |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 3173 | optional int32 uid = 1 [(is_uid) = true]; |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 3174 | // The interface name on which the packet was received. |
| 3175 | optional string iface = 2; |
| 3176 | // The ethertype value of the packet. |
| 3177 | optional int32 ethertype = 3; |
| 3178 | // String representation of the destination MAC address of the packet. |
| 3179 | optional string destination_hardware_address = 4; |
| 3180 | // String representation of the source address of the packet if this was an IP packet. |
| 3181 | optional string source_ip = 5; |
| 3182 | // String representation of the destination address of the packet if this was an IP packet. |
| 3183 | optional string destination_ip = 6; |
| 3184 | // The value of the protocol field if this was an IPv4 packet or the value of the Next Header |
| 3185 | // field if this was an IPv6 packet. The range of possible values is the same for both IP |
| 3186 | // families. |
| 3187 | optional int32 ip_next_header = 7; |
| 3188 | // The source port if this was a TCP or UDP packet. |
| 3189 | optional int32 source_port = 8; |
| 3190 | // The destination port if this was a TCP or UDP packet. |
| 3191 | optional int32 destination_port = 9; |
| 3192 | } |
| 3193 | |
| 3194 | /* |
| 3195 | * Logs the memory stats for an app on startup. |
| 3196 | * Logged from: |
| 3197 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
| 3198 | */ |
| 3199 | message AppStartMemoryStateCaptured { |
| 3200 | // The uid if available. -1 means not available. |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 3201 | optional int32 uid = 1 [(is_uid) = true]; |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 3202 | |
| 3203 | // The process name. |
| 3204 | optional string process_name = 2; |
| 3205 | |
| 3206 | // The activity name. |
| 3207 | optional string activity_name = 3; |
| 3208 | |
| 3209 | // # of page-faults |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 3210 | optional int64 page_fault = 4; |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 3211 | |
| 3212 | // # of major page-faults |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 3213 | optional int64 page_major_fault = 5; |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 3214 | |
| 3215 | // RSS |
| 3216 | optional int64 rss_in_bytes = 6; |
| 3217 | |
| 3218 | // CACHE |
| 3219 | optional int64 cache_in_bytes = 7; |
| 3220 | |
| 3221 | // SWAP |
| 3222 | optional int64 swap_in_bytes = 8; |
| 3223 | } |
| 3224 | |
| 3225 | /* |
| 3226 | * Logs the change in Low Memory Killer Daemon (LMKD) state which is used as start/stop boundaries |
| 3227 | * for LMK event. |
| 3228 | * Logged from: |
| 3229 | * system/core/lmkd/lmkd.c |
| 3230 | */ |
| 3231 | message LmkStateChanged { |
| 3232 | enum State { |
| 3233 | UNKNOWN = 0; |
| 3234 | START = 1; |
| 3235 | STOP = 2; |
| 3236 | } |
| 3237 | optional State state = 1; |
| 3238 | } |
| 3239 | |
| 3240 | /* |
| 3241 | * Logs the event when Low Memory Killer Daemon (LMKD) kills a process to reduce memory pressure. |
| 3242 | * Logged from: |
| 3243 | * system/core/lmkd/lmkd.c |
| 3244 | */ |
| 3245 | message LmkKillOccurred { |
| 3246 | // The uid if available. -1 means not available. |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 3247 | optional int32 uid = 1 [(is_uid) = true]; |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 3248 | |
| 3249 | // The process name. |
| 3250 | optional string process_name = 2; |
| 3251 | |
| 3252 | // oom adj score. |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 3253 | optional int32 oom_adj_score = 3; |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 3254 | |
| 3255 | // # of page-faults |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 3256 | optional int64 page_fault = 4; |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 3257 | |
| 3258 | // # of major page-faults |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 3259 | optional int64 page_major_fault = 5; |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 3260 | |
| 3261 | // RSS |
| 3262 | optional int64 rss_in_bytes = 6; |
| 3263 | |
| 3264 | // CACHE |
| 3265 | optional int64 cache_in_bytes = 7; |
| 3266 | |
| 3267 | // SWAP |
| 3268 | optional int64 swap_in_bytes = 8; |
Jim Blackler | 8593d1f | 2018-11-21 15:24:48 +0000 | [diff] [blame] | 3269 | |
| 3270 | // The elapsed real time of start of the process. |
| 3271 | optional int64 process_start_time_nanos = 9; |
Suren Baghdasaryan | 1fbaa1f | 2019-03-04 11:09:31 -0800 | [diff] [blame] | 3272 | |
| 3273 | // Min oom adj score considered by lmkd. |
| 3274 | optional int32 min_oom_score = 10; |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 3275 | } |
| 3276 | |
Rajeev Kumar | 51b5460 | 2018-03-01 12:18:26 -0800 | [diff] [blame] | 3277 | /* |
| 3278 | * Logs when the ActivityManagerService detects that an app died. |
| 3279 | * |
| 3280 | * Logged from: |
| 3281 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
| 3282 | */ |
| 3283 | message AppDied { |
| 3284 | // timestamp(elapsedRealtime) of record creation |
Yangster-mac | b6b77c6 | 2018-10-12 19:33:24 -0700 | [diff] [blame] | 3285 | optional uint64 timestamp_millis = 1 [(state_field_option).option = EXCLUSIVE]; |
Rajeev Kumar | 51b5460 | 2018-03-01 12:18:26 -0800 | [diff] [blame] | 3286 | } |
| 3287 | |
Howard Ro | 21a039c | 2018-08-06 14:55:47 -0700 | [diff] [blame] | 3288 | /** |
| 3289 | * An atom for generic metrics logging. Available from Android Q. |
| 3290 | */ |
| 3291 | message GenericAtom { |
| 3292 | // The uid of the application that sent this custom atom. |
| 3293 | optional int32 uid = 1 [(is_uid) = true]; |
| 3294 | |
| 3295 | // An event_id indicates the type of event. |
Howard Ro | 9a862de | 2018-10-11 16:03:33 -0700 | [diff] [blame] | 3296 | optional android.stats.EventType event_id = 2; |
Howard Ro | 21a039c | 2018-08-06 14:55:47 -0700 | [diff] [blame] | 3297 | } |
| 3298 | |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 3299 | /** |
Will Brockman | fbaa791 | 2019-10-24 15:15:09 -0400 | [diff] [blame] | 3300 | * Atom for simple logging of user interaction and impression events, such as "the user touched |
| 3301 | * this button" or "this dialog was displayed". |
| 3302 | * Keep the UI event stream clean: don't use for system or background events. |
| 3303 | * Log using the UiEventLogger wrapper - don't write with the StatsLog API directly. |
| 3304 | */ |
| 3305 | message UiEventReported { |
| 3306 | // The event_id. |
| 3307 | optional int32 event_id = 1; |
| 3308 | // The event's source or target uid and package, if applicable. |
| 3309 | // For example, the package posting a notification, or the destination package of a share. |
| 3310 | optional int32 uid = 2 [(is_uid) = true]; |
| 3311 | optional string package_name = 3; |
| 3312 | } |
| 3313 | |
| 3314 | /** |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 3315 | * Logs when a biometric acquire event occurs. |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 3316 | * |
| 3317 | * Logged from: |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 3318 | * frameworks/base/services/core/java/com/android/server/biometrics |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 3319 | */ |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 3320 | message BiometricAcquired { |
| 3321 | // Biometric modality that was acquired. |
| 3322 | optional android.hardware.biometrics.ModalityEnum modality = 1; |
| 3323 | // The associated user. Eg: 0 for owners, 10+ for others. Defined in android/os/UserHandle.java. |
| 3324 | optional int32 user = 2; |
| 3325 | // If this acquire is for a crypto operation. e.g. Secure purchases, unlock password storage. |
| 3326 | optional bool is_crypto = 3; |
| 3327 | // Action that the device is performing. Acquired messages are only expected for enroll and |
| 3328 | // authenticate. Other actions may indicate an error. |
| 3329 | optional android.hardware.biometrics.ActionEnum action = 4; |
| 3330 | // The client that this acquisition was received for. |
| 3331 | optional android.hardware.biometrics.ClientEnum client = 5; |
| 3332 | // Acquired constants, e.g. ACQUIRED_GOOD. See constants defined by <Biometric>Manager. |
| 3333 | optional int32 acquire_info = 6; |
| 3334 | // Vendor-specific acquire info. Valid only if acquire_info == ACQUIRED_VENDOR. |
| 3335 | optional int32 acquire_info_vendor = 7; |
joshmccloskey | 1fad0f6 | 2019-04-01 13:32:53 -0700 | [diff] [blame] | 3336 | // Dictates if this message should trigger additional debugging. |
| 3337 | optional bool debug = 8; |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 3338 | } |
| 3339 | |
| 3340 | /** |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 3341 | * Logs when a biometric authentication event occurs. |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 3342 | * |
| 3343 | * Logged from: |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 3344 | * frameworks/base/services/core/java/com/android/server/biometrics |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 3345 | */ |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 3346 | message BiometricAuthenticated { |
| 3347 | // Biometric modality that was used. |
| 3348 | optional android.hardware.biometrics.ModalityEnum modality = 1; |
| 3349 | // The associated user. Eg: 0 for owners, 10+ for others. Defined in android/os/UserHandle.java |
| 3350 | optional int32 user = 2; |
| 3351 | // If this authentication is for a crypto operation. e.g. Secure purchases, unlock password |
| 3352 | // storage. |
| 3353 | optional bool is_crypto = 3; |
| 3354 | // The client that this acquisition was received for. |
| 3355 | optional android.hardware.biometrics.ClientEnum client = 4; |
Kevin Chyn | db77e13 | 2019-01-29 13:30:41 -0800 | [diff] [blame] | 3356 | // If authentication requires user confirmation. See BiometricPrompt's |
| 3357 | // setRequireConfirmation(bool) method. |
| 3358 | optional bool require_confirmation = 5; |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 3359 | |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 3360 | enum State { |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 3361 | UNKNOWN = 0; |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 3362 | REJECTED = 1; |
| 3363 | PENDING_CONFIRMATION = 2; |
| 3364 | CONFIRMED = 3; |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 3365 | } |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 3366 | |
| 3367 | // State of the current auth attempt. |
Kevin Chyn | db77e13 | 2019-01-29 13:30:41 -0800 | [diff] [blame] | 3368 | optional State state = 6; |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 3369 | // Time it took to authenticate. For BiometricPrompt where setRequireConfirmation(false) is |
| 3370 | // specified and supported by the biometric modality, this is from the first ACQUIRED_GOOD to |
| 3371 | // AUTHENTICATED. for setRequireConfirmation(true), this is from PENDING_CONFIRMATION to |
| 3372 | // CONFIRMED. |
Kevin Chyn | db77e13 | 2019-01-29 13:30:41 -0800 | [diff] [blame] | 3373 | optional int64 latency_millis = 7; |
joshmccloskey | 1fad0f6 | 2019-04-01 13:32:53 -0700 | [diff] [blame] | 3374 | // Dictates if this message should trigger additional debugging. |
| 3375 | optional bool debug = 8; |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 3376 | } |
| 3377 | |
| 3378 | /** |
| 3379 | * Logs when a biometric error occurs. |
| 3380 | * |
| 3381 | * Logged from: |
| 3382 | * frameworks/base/services/core/java/com/android/server/biometrics |
| 3383 | */ |
| 3384 | message BiometricErrorOccurred { |
| 3385 | // Biometric modality that was used. |
| 3386 | optional android.hardware.biometrics.ModalityEnum modality = 1; |
| 3387 | // The associated user. Eg: 0 for owners, 10+ for others. Defined in android/os/UserHandle.java |
| 3388 | optional int32 user = 2; |
| 3389 | // If this error is for a crypto operation. e.g. Secure purchases, unlock password storage. |
| 3390 | optional bool is_crypto = 3; |
| 3391 | // Action that the device is performing. |
| 3392 | optional android.hardware.biometrics.ActionEnum action = 4; |
| 3393 | // The client that this acquisition was received for. |
| 3394 | optional android.hardware.biometrics.ClientEnum client = 5; |
| 3395 | // Error constants. See constants defined by <Biometric>Manager. Enums won't work since errors |
| 3396 | // are unique to modality. |
| 3397 | optional int32 error_info = 6; |
| 3398 | // Vendor-specific error info. Valid only if acquire_info == ACQUIRED_VENDOR. These are defined |
| 3399 | // by the vendor and not specified by the HIDL interface. |
| 3400 | optional int32 error_info_vendor = 7; |
joshmccloskey | 1fad0f6 | 2019-04-01 13:32:53 -0700 | [diff] [blame] | 3401 | // Dictates if this message should trigger additional debugging. |
| 3402 | optional bool debug = 8; |
Kevin Chyn | 7fca236 | 2019-06-20 17:20:42 -0700 | [diff] [blame] | 3403 | // Time spent during the authentication attempt. |
| 3404 | optional int64 latency_millis = 9; |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 3405 | } |
| 3406 | |
| 3407 | /** |
Kevin Chyn | e5a37fb | 2019-02-08 13:10:36 -0800 | [diff] [blame] | 3408 | * Logs when a system health issue is detected. |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 3409 | * Logged from: |
| 3410 | * frameworks/base/services/core/java/com/android/server/biometrics |
| 3411 | */ |
Kevin Chyn | e5a37fb | 2019-02-08 13:10:36 -0800 | [diff] [blame] | 3412 | message BiometricSystemHealthIssueDetected { |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 3413 | // Biometric modality. |
| 3414 | optional android.hardware.biometrics.ModalityEnum modality = 1; |
Kevin Chyn | e5a37fb | 2019-02-08 13:10:36 -0800 | [diff] [blame] | 3415 | // Type of issue detected. |
| 3416 | optional android.hardware.biometrics.IssueEnum issue = 2; |
joshmccloskey | 1fad0f6 | 2019-04-01 13:32:53 -0700 | [diff] [blame] | 3417 | // Dictates if this message should trigger additional debugging. |
| 3418 | optional bool debug = 3; |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 3419 | } |
Howard Ro | 688ae18 | 2018-09-25 00:09:36 -0700 | [diff] [blame] | 3420 | |
joshmccloskey | 6f952b2 | 2019-03-25 20:59:35 -0700 | [diff] [blame] | 3421 | /** |
| 3422 | * Logs when a biometric enrollment occurs. |
| 3423 | * |
| 3424 | * Logged from: |
| 3425 | * frameworks/base/services/core/java/com/android/server/biometrics |
| 3426 | */ |
| 3427 | message BiometricEnrolled { |
| 3428 | // Biometric modality that was used. |
| 3429 | optional android.hardware.biometrics.ModalityEnum modality = 1; |
| 3430 | // The associated user. Eg: 0 for owners, 10+ for others. Defined in android/os/UserHandle.java |
| 3431 | optional int32 user = 2; |
| 3432 | // The amount of time the enrollment took in milliseconds. |
| 3433 | optional int64 latency_millis = 3; |
| 3434 | // Whether or not the enrollment was successful. |
| 3435 | optional bool success = 4; |
| 3436 | } |
| 3437 | |
Chenjie Yu | ae9dfac | 2018-10-25 16:06:56 -0700 | [diff] [blame] | 3438 | /* |
Tej Singh | 0d17695 | 2019-01-16 19:10:54 -0800 | [diff] [blame] | 3439 | * 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] | 3440 | */ |
Tej Singh | 0d17695 | 2019-01-16 19:10:54 -0800 | [diff] [blame] | 3441 | message FlagFlipUpdateOccurred { |
| 3442 | // If the event is from a flag config package, specify the package name. |
| 3443 | optional string flag_flip_package_name = 1; |
| 3444 | |
| 3445 | // The order id of the package |
| 3446 | optional int64 order_id = 2; |
Yangster-mac | b89807e | 2018-11-15 21:10:57 -0800 | [diff] [blame] | 3447 | } |
| 3448 | |
Chenjie Yu | 6b1667c | 2019-01-18 10:09:33 -0800 | [diff] [blame] | 3449 | /** |
| 3450 | * Potential experiment ids that goes with a train install. |
| 3451 | */ |
| 3452 | message TrainExperimentIds { |
| 3453 | repeated int64 experiment_id = 1; |
| 3454 | } |
| 3455 | |
Yangster-mac | b89807e | 2018-11-15 21:10:57 -0800 | [diff] [blame] | 3456 | /* |
| 3457 | * Logs when a binary push state changes. |
Chenjie Yu | 8366c71 | 2019-01-16 20:48:30 -0800 | [diff] [blame] | 3458 | * Logged by the installer via public api. |
Yangster-mac | b89807e | 2018-11-15 21:10:57 -0800 | [diff] [blame] | 3459 | */ |
| 3460 | message BinaryPushStateChanged { |
Chenjie Yu | 8366c71 | 2019-01-16 20:48:30 -0800 | [diff] [blame] | 3461 | // Name of the train. |
| 3462 | optional string train_name = 1; |
| 3463 | // Version code for a "train" of packages that need to be installed atomically |
| 3464 | optional int64 train_version_code = 2; |
| 3465 | // After installation of this package, device requires a restart. |
| 3466 | optional bool requires_staging = 3; |
| 3467 | // Rollback should be enabled for this install. |
| 3468 | optional bool rollback_enabled = 4; |
| 3469 | // Requires low latency monitoring if possible. |
| 3470 | optional bool requires_low_latency_monitor = 5; |
| 3471 | |
Yangster-mac | b89807e | 2018-11-15 21:10:57 -0800 | [diff] [blame] | 3472 | enum State { |
Chenjie Yu | 8366c71 | 2019-01-16 20:48:30 -0800 | [diff] [blame] | 3473 | UNKNOWN = 0; |
| 3474 | INSTALL_REQUESTED = 1; |
| 3475 | INSTALL_STARTED = 2; |
| 3476 | INSTALL_STAGED_NOT_READY = 3; |
| 3477 | INSTALL_STAGED_READY = 4; |
| 3478 | INSTALL_SUCCESS = 5; |
Tej Singh | 403fe47 | 2019-04-30 12:54:21 -0700 | [diff] [blame] | 3479 | // Replaced by INSTALL_FAILURE_DOWNLOAD, INSTALL_FAILURE_STATE_MISMATCH, |
| 3480 | // and INSTALL_FAILURE_COMMIT. |
| 3481 | INSTALL_FAILURE = 6 [deprecated = true]; |
| 3482 | // 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] | 3483 | INSTALL_CANCELLED = 7; |
| 3484 | INSTALLER_ROLLBACK_REQUESTED = 8; |
Muhammad Qureshi | f4ca824 | 2019-03-01 09:20:15 -0800 | [diff] [blame] | 3485 | INSTALLER_ROLLBACK_INITIATED = 9; |
| 3486 | INSTALLER_ROLLBACK_INITIATED_FAILURE = 10; |
| 3487 | INSTALLER_ROLLBACK_STAGED = 11; |
| 3488 | INSTALLER_ROLLBACK_STAGED_FAILURE = 12; |
| 3489 | INSTALLER_ROLLBACK_BOOT_TRIGGERED = 13; |
| 3490 | INSTALLER_ROLLBACK_BOOT_TRIGGERED_FAILURE = 14; |
| 3491 | INSTALLER_ROLLBACK_SUCCESS = 15; |
| 3492 | INSTALLER_ROLLBACK_FAILURE = 16; |
Howard Ro | 174ed56 | 2019-04-07 22:17:58 -0700 | [diff] [blame] | 3493 | INSTALLER_ROLLBACK_STAGED_CANCEL_REQUESTED = 17; |
| 3494 | INSTALLER_ROLLBACK_STAGED_CANCEL_SUCCESS = 18; |
| 3495 | INSTALLER_ROLLBACK_STAGED_CANCEL_FAILURE = 19; |
| 3496 | INSTALL_STAGED_CANCEL_REQUESTED = 20; |
| 3497 | INSTALL_STAGED_CANCEL_SUCCESS = 21; |
| 3498 | INSTALL_STAGED_CANCEL_FAILURE = 22; |
Tej Singh | 403fe47 | 2019-04-30 12:54:21 -0700 | [diff] [blame] | 3499 | INSTALL_FAILURE_DOWNLOAD = 23; |
| 3500 | INSTALL_FAILURE_STATE_MISMATCH = 24; |
| 3501 | INSTALL_FAILURE_COMMIT = 25; |
Yangster-mac | b89807e | 2018-11-15 21:10:57 -0800 | [diff] [blame] | 3502 | } |
Chenjie Yu | 8366c71 | 2019-01-16 20:48:30 -0800 | [diff] [blame] | 3503 | optional State state = 6; |
Chenjie Yu | 6b1667c | 2019-01-18 10:09:33 -0800 | [diff] [blame] | 3504 | // Possible experiment ids for monitoring this push. |
| 3505 | optional TrainExperimentIds experiment_ids = 7 [(log_mode) = MODE_BYTES]; |
| 3506 | // user id |
| 3507 | optional int32 user_id = 8; |
Yangster-mac | b89807e | 2018-11-15 21:10:57 -0800 | [diff] [blame] | 3508 | } |
| 3509 | |
Tej Singh | c920308 | 2019-05-03 13:42:23 -0700 | [diff] [blame] | 3510 | /* Test atom, is not logged anywhere */ |
| 3511 | message TestAtomReported { |
| 3512 | repeated AttributionNode attribution_node = 1; |
| 3513 | optional int32 int_field = 2; |
| 3514 | optional int64 long_field = 3; |
| 3515 | optional float float_field = 4; |
| 3516 | optional string string_field = 5; |
| 3517 | optional bool boolean_field = 6; |
| 3518 | enum State { |
| 3519 | UNKNOWN = 0; |
| 3520 | OFF = 1; |
| 3521 | ON = 2; |
| 3522 | } |
| 3523 | optional State state = 7; |
| 3524 | optional TrainExperimentIds bytes_field = 8 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 3525 | } |
| 3526 | |
Maggie White | fc1aa59 | 2018-11-28 21:55:23 -0800 | [diff] [blame] | 3527 | /** Represents USB port overheat event. */ |
| 3528 | message UsbPortOverheatEvent { |
| 3529 | /* Temperature of USB port at USB plug event, in 1/10ths of degree C. */ |
| 3530 | optional int32 plug_temperature_deci_c = 1; |
| 3531 | |
| 3532 | /* Maximum temperature of USB port during overheat event, in 1/10ths of degree C. */ |
| 3533 | optional int32 max_temperature_deci_c = 2; |
| 3534 | |
| 3535 | /* Time between USB plug event and overheat threshold trip, in seconds. */ |
| 3536 | optional int32 time_to_overheat_secs = 3; |
| 3537 | |
| 3538 | /* Time between overheat threshold trip and hysteresis, in seconds. */ |
| 3539 | optional int32 time_to_hysteresis_secs = 4; |
| 3540 | |
| 3541 | /* Time between hysteresis and active mitigation ending, in seconds. */ |
| 3542 | optional int32 time_to_inactive_secs = 5; |
| 3543 | }; |
| 3544 | |
Maggie White | 8735b85 | 2019-01-18 11:40:49 -0800 | [diff] [blame] | 3545 | /** |
| 3546 | * Logs total effective full charge and discharge cycles on a battery. |
| 3547 | * Here are some examples of one effective cycle: |
| 3548 | * 1) the battery charges from 0% to 100% and drains back to 0%, |
| 3549 | * 2) charging from 50% to 100% and draining back to 50% twice. |
| 3550 | * Pulled from: |
| 3551 | * frameworks/base/cmds/statsd/src/external/ResourceHealthManagerPuller.cpp |
| 3552 | */ |
| 3553 | message BatteryCycleCount { |
| 3554 | /* Number of total charge and discharge cycles on the system battery. */ |
| 3555 | optional int32 cycle_count = 1; |
| 3556 | } |
| 3557 | |
Carmen Agimof | 35f7f6f | 2019-02-05 18:19:21 +0000 | [diff] [blame] | 3558 | /** |
Carmen Agimof | 12dec12 | 2019-03-06 16:14:38 +0000 | [diff] [blame] | 3559 | * Logs that external storage is mounted and information about it, the storage type (sd card/usb/ |
| 3560 | * others), its type (public or private) and the size in bytes. |
Carmen Agimof | 35f7f6f | 2019-02-05 18:19:21 +0000 | [diff] [blame] | 3561 | * Pulled from: |
| 3562 | * StatsCompanionService |
| 3563 | */ |
| 3564 | |
Carmen Agimof | 12dec12 | 2019-03-06 16:14:38 +0000 | [diff] [blame] | 3565 | message ExternalStorageInfo { |
Carmen Agimof | 35f7f6f | 2019-02-05 18:19:21 +0000 | [diff] [blame] | 3566 | |
Carmen Agimof | 12dec12 | 2019-03-06 16:14:38 +0000 | [diff] [blame] | 3567 | enum VolumeType { |
Carmen Agimof | 35f7f6f | 2019-02-05 18:19:21 +0000 | [diff] [blame] | 3568 | UNKNOWN = 0; |
Carmen Agimof | 12dec12 | 2019-03-06 16:14:38 +0000 | [diff] [blame] | 3569 | PUBLIC = 1; |
| 3570 | PRIVATE = 2; |
| 3571 | OTHER = 3; |
Carmen Agimof | 35f7f6f | 2019-02-05 18:19:21 +0000 | [diff] [blame] | 3572 | } |
| 3573 | |
Carmen Agimof | 12dec12 | 2019-03-06 16:14:38 +0000 | [diff] [blame] | 3574 | // The type of external storage. |
| 3575 | optional android.stats.storage.ExternalStorageType storage_type = 1; |
| 3576 | // Type of the volume: TYPE_PUBLIC if portable and TYPE_PRIVATE if internal. |
| 3577 | optional VolumeType volume_type = 2; |
Carmen Agimof | 35f7f6f | 2019-02-05 18:19:21 +0000 | [diff] [blame] | 3578 | // Total size of the sd card in bytes. |
Carmen Agimof | 12dec12 | 2019-03-06 16:14:38 +0000 | [diff] [blame] | 3579 | optional int64 size_bytes = 3; |
Carmen Agimof | 35f7f6f | 2019-02-05 18:19:21 +0000 | [diff] [blame] | 3580 | } |
| 3581 | |
Yangster-mac | b89807e | 2018-11-15 21:10:57 -0800 | [diff] [blame] | 3582 | /* |
Chenjie Yu | ae9dfac | 2018-10-25 16:06:56 -0700 | [diff] [blame] | 3583 | * Logs when a connection becomes available and lost. |
| 3584 | * Logged in StatsCompanionService.java |
| 3585 | */ |
| 3586 | message ConnectivityStateChanged { |
Chenjie Yu | 75b3c49 | 2018-10-06 21:45:19 -0700 | [diff] [blame] | 3587 | // Id of the network. |
| 3588 | optional int32 net_id = 1; |
| 3589 | |
| 3590 | enum State { |
| 3591 | UNKNOWN = 0; |
| 3592 | CONNECTED = 1; |
| 3593 | DISCONNECTED = 2; |
| 3594 | } |
| 3595 | // Connected state of a network. |
| 3596 | optional State state = 2; |
| 3597 | } |
| 3598 | |
| 3599 | /** |
| 3600 | * Logs when a service starts and stops. |
| 3601 | * Logged from: |
| 3602 | * services/core/java/com/android/server/am/ActiveServices.java |
| 3603 | */ |
| 3604 | message ServiceStateChanged { |
| 3605 | |
| 3606 | optional int32 uid = 1 [(is_uid) = true]; |
| 3607 | |
| 3608 | optional string package_name = 2; |
| 3609 | |
| 3610 | optional string service_name = 3; |
Chenjie Yu | ae9dfac | 2018-10-25 16:06:56 -0700 | [diff] [blame] | 3611 | |
| 3612 | enum State { |
Chenjie Yu | 75b3c49 | 2018-10-06 21:45:19 -0700 | [diff] [blame] | 3613 | START = 1; |
| 3614 | STOP = 2; |
Chenjie Yu | ae9dfac | 2018-10-25 16:06:56 -0700 | [diff] [blame] | 3615 | } |
Chenjie Yu | 75b3c49 | 2018-10-06 21:45:19 -0700 | [diff] [blame] | 3616 | |
| 3617 | optional State state = 4; |
| 3618 | } |
| 3619 | |
| 3620 | /** |
| 3621 | * Logs when a service is launched. |
| 3622 | * Logged from: |
| 3623 | * services/core/java/com/android/server/am/ActiveServices.java |
| 3624 | */ |
| 3625 | message ServiceLaunchReported { |
| 3626 | |
| 3627 | optional int32 uid = 1 [(is_uid) = true]; |
| 3628 | |
| 3629 | optional string package_name = 2; |
| 3630 | |
| 3631 | optional string service_name = 3; |
Chenjie Yu | ae9dfac | 2018-10-25 16:06:56 -0700 | [diff] [blame] | 3632 | } |
Howard Ro | 688ae18 | 2018-09-25 00:09:36 -0700 | [diff] [blame] | 3633 | |
Andrei Onea | 4ad6d0c | 2019-02-08 13:54:12 +0000 | [diff] [blame] | 3634 | /** |
| 3635 | * Logs when a hidden API is used. |
| 3636 | * |
| 3637 | * Logged from: |
| 3638 | * libcore/libart/src/main/java/dalvik/system/VMRuntime.java |
| 3639 | */ |
| 3640 | message HiddenApiUsed { |
| 3641 | // The uid of the app making the hidden access. |
| 3642 | optional int32 uid = 1 [(is_uid) = true]; |
| 3643 | |
| 3644 | // Signature of the method or field accessed. |
| 3645 | optional string signature = 2; |
| 3646 | |
| 3647 | enum AccessMethod { |
| 3648 | NONE = 0; |
| 3649 | REFLECTION = 1; |
| 3650 | JNI = 2; |
| 3651 | LINKING = 3; |
| 3652 | } |
| 3653 | |
| 3654 | // Type of access. |
| 3655 | optional AccessMethod access_method = 3; |
| 3656 | |
| 3657 | // Whether the access was prevented or not. |
| 3658 | optional bool access_denied = 4; |
| 3659 | } |
| 3660 | |
Fabian Kozynski | bfd6d85 | 2019-02-15 15:08:16 -0500 | [diff] [blame] | 3661 | /** |
| 3662 | * Logs user interaction with the Privacy Indicators added in Q. In particular: |
| 3663 | * - When user sees privacy chip |
| 3664 | * - When user clicks privacy chip |
| 3665 | * - How does the user exit the Privacy Dialog |
| 3666 | * Logged from: |
Fabian Kozynski | bfd6d85 | 2019-02-15 15:08:16 -0500 | [diff] [blame] | 3667 | * packages/SystemUI/src/com/android/systemui/qs/QuickStatusBarHeader.java |
| 3668 | */ |
| 3669 | message PrivacyIndicatorsInteracted { |
| 3670 | |
| 3671 | enum Type { |
| 3672 | UNKNOWN = 0; |
| 3673 | CHIP_VIEWED = 1; |
| 3674 | CHIP_CLICKED = 2; |
| 3675 | DIALOG_PRIVACY_SETTINGS = 3; |
| 3676 | DIALOG_DISMISS = 4; |
| 3677 | DIALOG_LINE_ITEM = 5; |
| 3678 | } |
| 3679 | |
| 3680 | optional Type type = 1 [(state_field_option).option = EXCLUSIVE]; |
| 3681 | |
| 3682 | // Used if the type is LINE_ITEM |
| 3683 | optional string package_name = 2; |
| 3684 | } |
| 3685 | |
Carmen Agimof | 6dcc503 | 2019-03-01 16:20:09 +0000 | [diff] [blame] | 3686 | /** |
| 3687 | * Logs information about a package that is moved from the internal to external storage and vice |
| 3688 | * versa. |
| 3689 | * It logs the package name, the type of the external storage where the package is installed |
| 3690 | * (if moved to external storage, or UNKNOWN if moved to internal storage), |
| 3691 | * and the move type: if it's from internal to external or the other way around. |
| 3692 | * |
| 3693 | * Logged from: |
| 3694 | frameworks/base/services/core/java/com/android/server/pm/PackageManagerService.java |
| 3695 | */ |
| 3696 | message AppMovedStorageReported { |
| 3697 | enum MoveType { |
| 3698 | UNKNOWN = 0; |
| 3699 | TO_EXTERNAL = 1; |
| 3700 | TO_INTERNAL = 2; |
| 3701 | } |
| 3702 | // The type of the external storage. |
| 3703 | optional android.stats.storage.ExternalStorageType external_storage_type = 1; |
| 3704 | // The type of move. |
| 3705 | optional MoveType move_type = 2; |
| 3706 | // The name of the package that was moved. |
| 3707 | optional string package_name = 3; |
| 3708 | } |
| 3709 | |
jianjin | 8f2dee0 | 2019-03-29 14:03:08 -0700 | [diff] [blame] | 3710 | /** |
| 3711 | * Logs when system server watchdog occurs. |
| 3712 | * Logged from: |
| 3713 | * frameworks/base/services/core/java/com/android/server/Watchdog.java |
| 3714 | */ |
| 3715 | message SystemServerWatchdogOccurred { |
| 3716 | optional string subject = 1; |
| 3717 | } |
| 3718 | |
| 3719 | /** |
| 3720 | * Logs when new file added to tombstones. |
| 3721 | * Logged from: |
| 3722 | * frameworks/base/core/java/com/android/server/BootReceiver.java |
| 3723 | */ |
| 3724 | message TombStoneOccurred { |
| 3725 | } |
| 3726 | |
Hai Zhang | 5d3328d | 2019-04-13 21:25:06 +0800 | [diff] [blame] | 3727 | /* |
| 3728 | * Information about a role request |
| 3729 | * |
| 3730 | * Logged from: |
| 3731 | * packages/apps/PermissionController/src/com/android/packageinstaller/role/ui/RequestRoleFragment.java |
| 3732 | */ |
| 3733 | message RoleRequestResultReported { |
| 3734 | // UID of application requesting the role |
| 3735 | optional int32 requesting_uid = 1; |
| 3736 | |
| 3737 | // Package name of application requesting the role |
| 3738 | optional string requesting_package_name = 2; |
| 3739 | |
| 3740 | // The role to be granted |
| 3741 | optional string role_name = 3; |
| 3742 | |
| 3743 | // The count of applications qualifying for the role |
| 3744 | optional int32 qualifying_count = 4; |
| 3745 | |
| 3746 | // UID of application current granted the role |
| 3747 | optional int32 current_uid = 5; |
| 3748 | |
| 3749 | // Package name of application current granted the role |
| 3750 | optional string current_package_name = 6; |
| 3751 | |
| 3752 | // UID of another application that user chose to grant the role to, instead of the requesting |
| 3753 | // application |
| 3754 | optional int32 granted_another_uid = 7; |
| 3755 | |
| 3756 | // Package name of another application that user chose to grant the role to, instead of the |
| 3757 | // requesting application |
| 3758 | optional string granted_another_package_name = 8; |
| 3759 | |
| 3760 | enum Result { |
| 3761 | UNDEFINED = 0; |
| 3762 | // role request was ignored |
| 3763 | IGNORED = 1; |
| 3764 | // role request was ignored because it's already granted |
| 3765 | IGNORED_ALREADY_GRANTED = 2; |
| 3766 | // role request was ignored because the application isn't qualified |
| 3767 | IGNORED_NOT_QUALIFIED = 3; |
| 3768 | // role request was ignored because user said it should be always denied |
| 3769 | IGNORED_USER_ALWAYS_DENIED = 4; |
| 3770 | // role was granted by user action |
| 3771 | USER_GRANTED = 5; |
| 3772 | // role was denied by user action |
| 3773 | USER_DENIED = 6; |
| 3774 | // role was denied by user granting another application the role |
| 3775 | USER_DENIED_GRANTED_ANOTHER = 7; |
| 3776 | // role was denied and set to be always denied by the user |
| 3777 | USER_DENIED_WITH_ALWAYS = 8; |
| 3778 | } |
| 3779 | // The result of the role request |
| 3780 | optional Result result = 9; |
| 3781 | } |
| 3782 | |
Mark Tabry | a824a64 | 2019-11-05 12:26:12 -0800 | [diff] [blame] | 3783 | /** |
| 3784 | * Logs when a Vehicle Maps Service client's connection state has changed |
| 3785 | * |
| 3786 | * Logged from: |
| 3787 | * packages/services/Car/service/src/com/android/car/stats/VmsClientLog.java |
| 3788 | */ |
| 3789 | message VmsClientConnectionStateChanged { |
| 3790 | // The UID of the VMS client app |
| 3791 | optional int32 uid = 1 [(is_uid) = true]; |
| 3792 | |
| 3793 | enum State { |
| 3794 | UNKNOWN = 0; |
| 3795 | // Attempting to connect to the client |
| 3796 | CONNECTING = 1; |
| 3797 | // Client connection established |
| 3798 | CONNECTED = 2; |
| 3799 | // Client connection closed unexpectedly |
| 3800 | DISCONNECTED = 3; |
| 3801 | // Client connection closed by VMS |
| 3802 | TERMINATED = 4; |
| 3803 | // Error establishing the client connection |
| 3804 | CONNECTION_ERROR = 5; |
| 3805 | } |
| 3806 | |
| 3807 | optional State state = 2; |
| 3808 | } |
| 3809 | |
Jeff Sharkey | 6bd2157 | 2019-11-15 20:45:33 -0700 | [diff] [blame] | 3810 | /** |
| 3811 | * Logs when MediaProvider has successfully finished scanning a storage volume. |
| 3812 | * |
| 3813 | * Logged from: |
| 3814 | * packages/providers/MediaProvider/src/com/android/providers/media/scan/ModernMediaScanner.java |
| 3815 | */ |
| 3816 | message MediaProviderScanEvent { |
| 3817 | enum Reason { |
| 3818 | // Scan triggered due to unknown reason |
| 3819 | UNKNOWN = 0; |
| 3820 | // Scan triggered due to storage volume being mounted |
| 3821 | MOUNTED = 1; |
| 3822 | // Scan triggered due to explicit user action or app request |
| 3823 | DEMAND = 2; |
| 3824 | // Scan triggered due to idle maintenance |
| 3825 | IDLE = 3; |
| 3826 | } |
| 3827 | |
| 3828 | // Volume type that this event pertains to |
| 3829 | optional android.stats.mediaprovider.VolumeType volume_type = 1; |
| 3830 | // Reason why this scan was triggered |
| 3831 | optional Reason reason = 2; |
| 3832 | // Total number of files scanned |
| 3833 | optional int64 item_count = 3; |
| 3834 | // Duration of scan, normalized per file |
| 3835 | optional float normalized_duration_millis = 4; |
| 3836 | // Number of database inserts, normalized per file |
| 3837 | optional float normalized_insert_count = 5; |
| 3838 | // Number of database updates, normalized per file |
| 3839 | optional float normalized_update_count = 6; |
| 3840 | // Number of database deletes, normalized per file |
| 3841 | optional float normalized_delete_count = 7; |
| 3842 | } |
| 3843 | |
| 3844 | /** |
| 3845 | * Logs when an app has asked MediaProvider to delete media belonging to the user. |
| 3846 | * |
| 3847 | * Logged from: |
| 3848 | * packages/providers/MediaProvider/src/com/android/providers/media/MediaProvider.java |
| 3849 | */ |
| 3850 | message MediaProviderDeletionEvent { |
| 3851 | // Volume type that this event pertains to |
| 3852 | optional android.stats.mediaprovider.VolumeType volume_type = 1; |
| 3853 | // Device timestamp when this deletion event occurred |
| 3854 | optional int64 timestamp_millis = 2; |
| 3855 | // App that requested deletion |
| 3856 | optional string package_name = 3; |
| 3857 | // Number of items that were deleted |
| 3858 | optional int32 item_count = 4; |
| 3859 | } |
| 3860 | |
| 3861 | /** |
| 3862 | * Logs when an app has asked MediaProvider to grant them access to media belonging to the user. |
| 3863 | * |
| 3864 | * Logged from: |
| 3865 | * packages/providers/MediaProvider/src/com/android/providers/media/PermissionActivity.java |
| 3866 | */ |
| 3867 | message MediaProviderPermissionEvent { |
| 3868 | enum Result { |
| 3869 | UNKNOWN = 0; |
| 3870 | USER_GRANTED = 1; |
| 3871 | AUTO_GRANTED = 2; |
| 3872 | USER_DENIED = 3; |
| 3873 | USER_DENIED_WITH_PREJUDICE = 4; |
| 3874 | AUTO_DENIED = 5; |
| 3875 | } |
| 3876 | |
| 3877 | // Volume type that this event pertains to |
| 3878 | optional android.stats.mediaprovider.VolumeType volume_type = 1; |
| 3879 | // Device timestamp when this permission event occurred |
| 3880 | optional int64 timestamp_millis = 2; |
| 3881 | // App that requested permission |
| 3882 | optional string package_name = 3; |
| 3883 | // Number of items that were requested |
| 3884 | optional int32 item_count = 4; |
| 3885 | // Result of this request |
| 3886 | optional Result result = 5; |
| 3887 | } |
| 3888 | |
| 3889 | /** |
| 3890 | * Logs when MediaProvider has finished upgrading or downgrading its database schema. |
| 3891 | * |
| 3892 | * Logged from: |
| 3893 | * packages/providers/MediaProvider/src/com/android/providers/media/DatabaseHelper.java |
| 3894 | */ |
| 3895 | message MediaProviderSchemaChange { |
| 3896 | // Volume type that this event pertains to |
| 3897 | optional android.stats.mediaprovider.VolumeType volume_type = 1; |
| 3898 | // Old database version code |
| 3899 | optional int32 version_from = 2; |
| 3900 | // New database version code |
| 3901 | optional int32 version_to = 3; |
| 3902 | // Total number of files in database |
| 3903 | optional int64 item_count = 4; |
| 3904 | // Duration of schema change, normalized per file |
| 3905 | optional float normalized_duration_millis = 5; |
| 3906 | } |
| 3907 | |
| 3908 | /** |
| 3909 | * Logs when MediaProvider has finished an idle maintenance job. |
| 3910 | * |
| 3911 | * Logged from: |
| 3912 | * packages/providers/MediaProvider/src/com/android/providers/media/MediaProvider.java |
| 3913 | */ |
| 3914 | message MediaProviderIdleMaintenance { |
| 3915 | // Volume type that this event pertains to |
| 3916 | optional android.stats.mediaprovider.VolumeType volume_type = 1; |
| 3917 | |
| 3918 | // Total number of files in database |
| 3919 | optional int64 item_count = 2; |
| 3920 | // Duration of idle maintenance, normalized per file |
| 3921 | optional float normalized_duration_millis = 3; |
| 3922 | // Number of thumbnails found to be stale, normalized per file |
| 3923 | optional float normalized_stale_thumbnails = 4; |
| 3924 | // Number of items found to be expired, normalized per file |
| 3925 | optional float normalized_expired_media = 5; |
| 3926 | } |
| 3927 | |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 3928 | ////////////////////////////////////////////////////////////////////// |
| 3929 | // Pulled atoms below this line // |
| 3930 | ////////////////////////////////////////////////////////////////////// |
| 3931 | |
| 3932 | /** |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 3933 | * Pulls bytes transferred via wifi (Sum of foreground and background usage). |
| 3934 | * |
| 3935 | * Pulled from: |
| 3936 | * StatsCompanionService (using BatteryStats to get which interfaces are wifi) |
| 3937 | */ |
Chenjie Yu | 31d14d7 | 2017-12-12 17:54:33 -0800 | [diff] [blame] | 3938 | message WifiBytesTransfer { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 3939 | optional int32 uid = 1 [(is_uid) = true]; |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 3940 | |
| 3941 | optional int64 rx_bytes = 2; |
| 3942 | |
| 3943 | optional int64 rx_packets = 3; |
| 3944 | |
| 3945 | optional int64 tx_bytes = 4; |
| 3946 | |
| 3947 | optional int64 tx_packets = 5; |
| 3948 | } |
| 3949 | |
| 3950 | /** |
| 3951 | * Pulls bytes transferred via wifi (separated by foreground and background usage). |
| 3952 | * |
| 3953 | * Pulled from: |
| 3954 | * StatsCompanionService (using BatteryStats to get which interfaces are wifi) |
| 3955 | */ |
Chenjie Yu | 31d14d7 | 2017-12-12 17:54:33 -0800 | [diff] [blame] | 3956 | message WifiBytesTransferByFgBg { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 3957 | optional int32 uid = 1 [(is_uid) = true]; |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 3958 | |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 3959 | // 1 denotes foreground and 0 denotes background. This is called Set in NetworkStats. |
| 3960 | optional bool is_foreground = 2; |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 3961 | |
| 3962 | optional int64 rx_bytes = 3; |
| 3963 | |
| 3964 | optional int64 rx_packets = 4; |
| 3965 | |
| 3966 | optional int64 tx_bytes = 5; |
| 3967 | |
| 3968 | optional int64 tx_packets = 6; |
| 3969 | } |
| 3970 | |
| 3971 | /** |
| 3972 | * Pulls bytes transferred via mobile networks (Sum of foreground and background usage). |
| 3973 | * |
| 3974 | * Pulled from: |
| 3975 | * StatsCompanionService (using BatteryStats to get which interfaces are mobile data) |
| 3976 | */ |
Chenjie Yu | 31d14d7 | 2017-12-12 17:54:33 -0800 | [diff] [blame] | 3977 | message MobileBytesTransfer { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 3978 | optional int32 uid = 1 [(is_uid) = true]; |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 3979 | |
| 3980 | optional int64 rx_bytes = 2; |
| 3981 | |
| 3982 | optional int64 rx_packets = 3; |
| 3983 | |
| 3984 | optional int64 tx_bytes = 4; |
| 3985 | |
| 3986 | optional int64 tx_packets = 5; |
| 3987 | } |
| 3988 | |
| 3989 | /** |
| 3990 | * Pulls bytes transferred via mobile networks (separated by foreground and background usage). |
| 3991 | * |
| 3992 | * Pulled from: |
| 3993 | * StatsCompanionService (using BatteryStats to get which interfaces are mobile data) |
| 3994 | */ |
Chenjie Yu | 31d14d7 | 2017-12-12 17:54:33 -0800 | [diff] [blame] | 3995 | message MobileBytesTransferByFgBg { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 3996 | optional int32 uid = 1 [(is_uid) = true]; |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 3997 | |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 3998 | // 1 denotes foreground and 0 denotes background. This is called Set in |
| 3999 | // NetworkStats. |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 4000 | optional bool is_foreground = 2; |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 4001 | |
| 4002 | optional int64 rx_bytes = 3; |
| 4003 | |
| 4004 | optional int64 rx_packets = 4; |
| 4005 | |
| 4006 | optional int64 tx_bytes = 5; |
| 4007 | |
| 4008 | optional int64 tx_packets = 6; |
| 4009 | } |
| 4010 | |
| 4011 | /** |
Chenjie Yu | 9d7720b | 2018-01-24 10:34:48 -0800 | [diff] [blame] | 4012 | * Pulls bytes transferred via bluetooth. It is pulled from Bluetooth controller. |
| 4013 | * |
| 4014 | * Pulled from: |
| 4015 | * StatsCompanionService |
| 4016 | */ |
| 4017 | message BluetoothBytesTransfer { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 4018 | optional int32 uid = 1 [(is_uid) = true]; |
Chenjie Yu | 9d7720b | 2018-01-24 10:34:48 -0800 | [diff] [blame] | 4019 | |
| 4020 | optional int64 rx_bytes = 2; |
| 4021 | |
| 4022 | optional int64 tx_bytes = 3; |
| 4023 | } |
| 4024 | |
| 4025 | /** |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 4026 | * Pulls the kernel wakelock durations. This atom is adapted from |
| 4027 | * android/internal/os/KernelWakelockStats.java |
| 4028 | * |
| 4029 | * Pulled from: |
| 4030 | * StatsCompanionService using KernelWakelockReader. |
| 4031 | */ |
Chenjie Yu | 31d14d7 | 2017-12-12 17:54:33 -0800 | [diff] [blame] | 4032 | message KernelWakelock { |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 4033 | optional string name = 1; |
| 4034 | |
| 4035 | optional int32 count = 2; |
| 4036 | |
| 4037 | optional int32 version = 3; |
| 4038 | |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 4039 | optional int64 time_micros = 4; |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 4040 | } |
Chenjie Yu | 5305e1d | 2017-10-31 13:49:36 -0700 | [diff] [blame] | 4041 | |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 4042 | /** |
Benjamin Schwartz | 51329b7 | 2018-12-06 10:48:03 -0800 | [diff] [blame] | 4043 | * Pulls low power state information. If power.stats HAL is not available, this |
| 4044 | * includes platform and subsystem sleep state information, |
| 4045 | * PowerStatePlatformSleepState, PowerStateVoter or PowerStateSubsystemSleepState |
| 4046 | * as defined in: |
Chenjie Yu | 5305e1d | 2017-10-31 13:49:36 -0700 | [diff] [blame] | 4047 | * hardware/interfaces/power/1.0/types.hal |
Chenjie Yu | 5305e1d | 2017-10-31 13:49:36 -0700 | [diff] [blame] | 4048 | * hardware/interfaces/power/1.1/types.hal |
Benjamin Schwartz | 51329b7 | 2018-12-06 10:48:03 -0800 | [diff] [blame] | 4049 | * If power.stats HAL is available, this includes PowerEntityStateResidencyResult |
| 4050 | * as defined in: |
| 4051 | * hardware/interfaces/power/stats/1.0/types.hal |
Chenjie Yu | 5305e1d | 2017-10-31 13:49:36 -0700 | [diff] [blame] | 4052 | */ |
Chenjie Yu | 31d14d7 | 2017-12-12 17:54:33 -0800 | [diff] [blame] | 4053 | message SubsystemSleepState { |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 4054 | // Subsystem name |
| 4055 | optional string subsystem_name = 1; |
| 4056 | // For PlatformLowPowerStats (hal 1.0), this is the voter name, which could be empty. |
| 4057 | // For SubsystemLowPowerStats (hal 1.1), this is the sleep state name. |
Benjamin Schwartz | 51329b7 | 2018-12-06 10:48:03 -0800 | [diff] [blame] | 4058 | // For PowerEntityStateResidencyResult (hal power/stats/1.0) this is the |
| 4059 | // powerEntityStateName from the corresponding PowerEntityStateInfo. |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 4060 | optional string subname = 2; |
Chenjie Yu | c8b7f22 | 2018-01-11 23:25:57 -0800 | [diff] [blame] | 4061 | // 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] | 4062 | optional uint64 count = 3; |
Chenjie Yu | c8b7f22 | 2018-01-11 23:25:57 -0800 | [diff] [blame] | 4063 | // 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] | 4064 | optional uint64 time_millis = 4; |
David Chen | 2158296 | 2017-11-01 17:32:46 -0700 | [diff] [blame] | 4065 | } |
Chenjie Yu | 7f8def9 | 2017-11-03 09:33:15 -0700 | [diff] [blame] | 4066 | |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 4067 | /** |
Bookatz | 92da283 | 2018-11-01 18:10:03 -0700 | [diff] [blame] | 4068 | * Pulls on-device power measurement information. |
| 4069 | * Data defined by hardware/interfaces/power/stats/1.0/types.hal. |
| 4070 | * Pulled from: |
| 4071 | * frameworks/base/cmds/statsd/src/external/PowerStatsPuller.cpp |
| 4072 | */ |
| 4073 | message OnDevicePowerMeasurement { |
| 4074 | // Name of the subsystem (to which the rail belongs). |
| 4075 | optional string subsystem_name = 1; |
| 4076 | |
| 4077 | // Rail name. The rail lies within the subsystem. |
| 4078 | optional string rail_name = 2; |
| 4079 | |
| 4080 | // Time (in ms since boot) at which the rail energy value was measured. |
| 4081 | // This may differ slightly from the time that statsd logs this information. |
| 4082 | optional uint64 measurement_timestamp_millis = 3; |
| 4083 | |
| 4084 | // Accumulated energy used via the rail since device boot in uWs. |
| 4085 | optional uint64 energy_microwatt_secs = 4; |
| 4086 | } |
| 4087 | |
| 4088 | /** |
Chenjie Yu | 7f8def9 | 2017-11-03 09:33:15 -0700 | [diff] [blame] | 4089 | * Pulls Cpu time per frequency. |
Chenjie Yu | 1ee9b74 | 2018-01-10 16:02:57 -0800 | [diff] [blame] | 4090 | * Pulls the time the cpu spend on the frequency index. Frequency index |
| 4091 | * starts from highest to lowest. The value should be monotonically |
| 4092 | * increasing since boot. However, if there is a cpu |
| 4093 | * hotplug event, the value would be reset as well. |
Chenjie Yu | 7f8def9 | 2017-11-03 09:33:15 -0700 | [diff] [blame] | 4094 | */ |
Chenjie Yu | 31d14d7 | 2017-12-12 17:54:33 -0800 | [diff] [blame] | 4095 | message CpuTimePerFreq { |
Chenjie Yu | 7f8def9 | 2017-11-03 09:33:15 -0700 | [diff] [blame] | 4096 | optional uint32 cluster = 1; |
| 4097 | optional uint32 freq_index = 2; |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 4098 | optional uint64 time_millis = 3; |
Chenjie Yu | 7f8def9 | 2017-11-03 09:33:15 -0700 | [diff] [blame] | 4099 | } |
Chenjie Yu | e33bc3b | 2017-11-06 17:56:44 -0800 | [diff] [blame] | 4100 | |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 4101 | /** |
Chenjie Yu | e33bc3b | 2017-11-06 17:56:44 -0800 | [diff] [blame] | 4102 | * Pulls Cpu Time Per Uid. |
| 4103 | * Note that isolated process uid time should be attributed to host uids. |
| 4104 | */ |
Chenjie Yu | 31d14d7 | 2017-12-12 17:54:33 -0800 | [diff] [blame] | 4105 | message CpuTimePerUid { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 4106 | optional int32 uid = 1 [(is_uid) = true]; |
Misha Wagner | 6bc6c91 | 2018-11-16 13:19:54 +0000 | [diff] [blame] | 4107 | optional uint64 user_time_micros = 2; |
| 4108 | optional uint64 sys_time_micros = 3; |
Chenjie Yu | e33bc3b | 2017-11-06 17:56:44 -0800 | [diff] [blame] | 4109 | } |
| 4110 | |
| 4111 | /** |
| 4112 | * Pulls Cpu Time Per Uid per frequency. |
| 4113 | * Note that isolated process uid time should be attributed to host uids. |
| 4114 | * For each uid, we order the time by descending frequencies. |
| 4115 | */ |
Chenjie Yu | 31d14d7 | 2017-12-12 17:54:33 -0800 | [diff] [blame] | 4116 | message CpuTimePerUidFreq { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 4117 | optional int32 uid = 1 [(is_uid) = true]; |
Chenjie Yu | ec67661 | 2018-03-07 09:19:17 -0800 | [diff] [blame] | 4118 | optional uint32 freq_index = 2; |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 4119 | optional uint64 time_millis = 3; |
Chenjie Yu | e33bc3b | 2017-11-06 17:56:44 -0800 | [diff] [blame] | 4120 | } |
Hugo Benichi | 884970e | 2017-11-14 22:42:46 +0900 | [diff] [blame] | 4121 | |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 4122 | /** |
| 4123 | * Pulls Wifi Controller Activity Energy Info |
| 4124 | */ |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 4125 | message WifiActivityInfo { |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 4126 | // timestamp(wall clock) of record creation |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 4127 | optional uint64 timestamp_millis = 1; |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 4128 | // stack reported state |
| 4129 | // TODO: replace this with proto enum |
| 4130 | optional int32 stack_state = 2; |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 4131 | // tx time in millis |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 4132 | optional uint64 controller_tx_time_millis = 3; |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 4133 | // rx time in millis |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 4134 | optional uint64 controller_rx_time_millis = 4; |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 4135 | // idle time in millis |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 4136 | optional uint64 controller_idle_time_millis = 5; |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 4137 | // product of current(mA), voltage(V) and time(ms) |
| 4138 | optional uint64 controller_energy_used = 6; |
| 4139 | } |
| 4140 | |
| 4141 | /** |
| 4142 | * Pulls Modem Activity Energy Info |
| 4143 | */ |
Chenjie Yu | 31d14d7 | 2017-12-12 17:54:33 -0800 | [diff] [blame] | 4144 | message ModemActivityInfo { |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 4145 | // timestamp(wall clock) of record creation |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 4146 | optional uint64 timestamp_millis = 1; |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 4147 | // sleep time in millis. |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 4148 | optional uint64 sleep_time_millis = 2; |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 4149 | // idle time in millis |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 4150 | optional uint64 controller_idle_time_millis = 3; |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 4151 | /** |
| 4152 | * Tx power index |
| 4153 | * index 0 = tx_power < 0dBm |
| 4154 | * index 1 = 0dBm < tx_power < 5dBm |
| 4155 | * index 2 = 5dBm < tx_power < 15dBm |
| 4156 | * index 3 = 15dBm < tx_power < 20dBm |
| 4157 | * index 4 = tx_power > 20dBm |
| 4158 | */ |
| 4159 | // tx time in ms at power level 0 |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 4160 | optional uint64 controller_tx_time_pl0_millis = 4; |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 4161 | // tx time in ms at power level 1 |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 4162 | optional uint64 controller_tx_time_pl1_millis = 5; |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 4163 | // tx time in ms at power level 2 |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 4164 | optional uint64 controller_tx_time_pl2_millis = 6; |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 4165 | // tx time in ms at power level 3 |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 4166 | optional uint64 controller_tx_time_pl3_millis = 7; |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 4167 | // tx time in ms at power level 4 |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 4168 | optional uint64 controller_tx_time_pl4_millis = 8; |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 4169 | // rx time in ms at power level 5 |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 4170 | optional uint64 controller_rx_time_millis = 9; |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 4171 | // product of current(mA), voltage(V) and time(ms) |
Chen Xu | 7322e4a | 2019-09-07 15:51:22 -0700 | [diff] [blame] | 4172 | optional uint64 energy_used = 10 [deprecated=true]; |
Joe Onorato | 62c220b | 2017-11-18 20:32:56 -0800 | [diff] [blame] | 4173 | } |
Rajeev Kumar | 508a9bf | 2018-01-18 15:49:11 -0800 | [diff] [blame] | 4174 | |
Chenjie Yu | 9d7720b | 2018-01-24 10:34:48 -0800 | [diff] [blame] | 4175 | /** |
| 4176 | * Pulls Bluetooth Activity Energy Info |
| 4177 | * Note: BluetoothBytesTransfer is pulled at the same time from the controller. |
| 4178 | */ |
| 4179 | message BluetoothActivityInfo { |
| 4180 | // timestamp(wall clock) of record creation |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 4181 | optional uint64 timestamp_millis = 1; |
Chenjie Yu | 9d7720b | 2018-01-24 10:34:48 -0800 | [diff] [blame] | 4182 | // bluetooth stack state |
| 4183 | optional int32 bluetooth_stack_state = 2; |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 4184 | // tx time in millis |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 4185 | optional uint64 controller_tx_time_millis = 3; |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 4186 | // rx time in millis |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 4187 | optional uint64 controller_rx_time_millis = 4; |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 4188 | // idle time in millis |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 4189 | optional uint64 controller_idle_time_millis = 5; |
Chenjie Yu | 9d7720b | 2018-01-24 10:34:48 -0800 | [diff] [blame] | 4190 | // product of current(mA), voltage(V) and time(ms) |
| 4191 | optional uint64 energy_used = 6; |
| 4192 | } |
| 4193 | |
Rajeev Kumar | 508a9bf | 2018-01-18 15:49:11 -0800 | [diff] [blame] | 4194 | /* |
Rajeev Kumar | 8a9fa05 | 2018-01-25 19:03:09 -0800 | [diff] [blame] | 4195 | * Logs the memory stats for a process. |
Rafal Slawik | da51b93 | 2018-12-13 16:31:33 +0000 | [diff] [blame] | 4196 | * |
| 4197 | * Pulled from StatsCompanionService for all managed processes (from ActivityManagerService). |
Rajeev Kumar | 8a9fa05 | 2018-01-25 19:03:09 -0800 | [diff] [blame] | 4198 | */ |
| 4199 | message ProcessMemoryState { |
| 4200 | // The uid if available. -1 means not available. |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 4201 | optional int32 uid = 1 [(is_uid) = true]; |
Rajeev Kumar | 8a9fa05 | 2018-01-25 19:03:09 -0800 | [diff] [blame] | 4202 | |
| 4203 | // The process name. |
Rafal Slawik | da51b93 | 2018-12-13 16:31:33 +0000 | [diff] [blame] | 4204 | // Usually package name, "system" for system server. |
| 4205 | // Provided by ActivityManagerService. |
Rajeev Kumar | 8a9fa05 | 2018-01-25 19:03:09 -0800 | [diff] [blame] | 4206 | optional string process_name = 2; |
| 4207 | |
Rafal Slawik | da51b93 | 2018-12-13 16:31:33 +0000 | [diff] [blame] | 4208 | // Current OOM score adjustment. Value read from ProcessRecord. |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 4209 | optional int32 oom_adj_score = 3; |
Rajeev Kumar | 8a9fa05 | 2018-01-25 19:03:09 -0800 | [diff] [blame] | 4210 | |
| 4211 | // # of page-faults |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 4212 | optional int64 page_fault = 4; |
Rajeev Kumar | 8a9fa05 | 2018-01-25 19:03:09 -0800 | [diff] [blame] | 4213 | |
| 4214 | // # of major page-faults |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 4215 | optional int64 page_major_fault = 5; |
Rajeev Kumar | 8a9fa05 | 2018-01-25 19:03:09 -0800 | [diff] [blame] | 4216 | |
Rajeev Kumar | 9023599 | 2018-01-29 11:06:48 -0800 | [diff] [blame] | 4217 | // RSS |
Rafal Slawik | 203c3db | 2019-09-25 19:53:01 +0100 | [diff] [blame] | 4218 | // Value is read from memory.stat, field total_rss if per-app memory |
| 4219 | // cgroups are enabled. Otherwise, value from /proc/pid/stat. |
Rajeev Kumar | 9023599 | 2018-01-29 11:06:48 -0800 | [diff] [blame] | 4220 | optional int64 rss_in_bytes = 6; |
| 4221 | |
| 4222 | // CACHE |
Rafal Slawik | da51b93 | 2018-12-13 16:31:33 +0000 | [diff] [blame] | 4223 | // Value is read from memory.stat, field total_cache if per-app memory |
| 4224 | // cgroups are enabled. Otherwise, 0. |
Rajeev Kumar | 9023599 | 2018-01-29 11:06:48 -0800 | [diff] [blame] | 4225 | optional int64 cache_in_bytes = 7; |
| 4226 | |
| 4227 | // SWAP |
Rafal Slawik | da51b93 | 2018-12-13 16:31:33 +0000 | [diff] [blame] | 4228 | // 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] | 4229 | // cgroups are enabled. Otherwise, 0. |
Rajeev Kumar | 9023599 | 2018-01-29 11:06:48 -0800 | [diff] [blame] | 4230 | optional int64 swap_in_bytes = 8; |
Rafal Slawik | aaf6089 | 2018-09-12 13:04:30 +0100 | [diff] [blame] | 4231 | |
Rafal Slawik | 203c3db | 2019-09-25 19:53:01 +0100 | [diff] [blame] | 4232 | // Deprecated: use ProcessMemoryHighWaterMark atom instead. Always -1. |
Rafal Slawik | 3bea895 | 2018-11-15 12:39:33 +0000 | [diff] [blame] | 4233 | optional int64 rss_high_watermark_in_bytes = 9 [deprecated = true]; |
Rafal Slawik | 272a816 | 2018-11-01 15:12:28 +0000 | [diff] [blame] | 4234 | |
Rafal Slawik | 203c3db | 2019-09-25 19:53:01 +0100 | [diff] [blame] | 4235 | // Deprecated: use ProcessMemorySnapshot atom instead. Always -1. |
| 4236 | optional int64 start_time_nanos = 10 [deprecated = true]; |
Ioannis Ilkos | 466ad6c | 2019-06-18 17:42:00 +0100 | [diff] [blame] | 4237 | |
Rafal Slawik | 203c3db | 2019-09-25 19:53:01 +0100 | [diff] [blame] | 4238 | // Deprecated: use ProcessMemorySnapshot atom instead. Always -1. |
| 4239 | optional int32 anon_rss_and_swap_in_kilobytes = 11 [deprecated = true]; |
Rafal Slawik | 0862158 | 2018-10-15 14:53:07 +0100 | [diff] [blame] | 4240 | } |
| 4241 | |
| 4242 | /* |
Rafal Slawik | 3bea895 | 2018-11-15 12:39:33 +0000 | [diff] [blame] | 4243 | * Logs the memory high-water mark for a process. |
Rafal Slawik | da51b93 | 2018-12-13 16:31:33 +0000 | [diff] [blame] | 4244 | * |
| 4245 | * Pulled from StatsCompanionService for all managed processes (from ActivityManagerServie) |
| 4246 | * and for selected native processes. |
Rafal Slawik | 44b8814 | 2018-12-15 16:48:09 +0000 | [diff] [blame] | 4247 | * |
| 4248 | * Pulling this atom resets high-water mark counters for all processes. |
Rafal Slawik | 3bea895 | 2018-11-15 12:39:33 +0000 | [diff] [blame] | 4249 | */ |
| 4250 | message ProcessMemoryHighWaterMark { |
| 4251 | // The uid if available. -1 means not available. |
| 4252 | optional int32 uid = 1 [(is_uid) = true]; |
| 4253 | |
Rafal Slawik | da51b93 | 2018-12-13 16:31:33 +0000 | [diff] [blame] | 4254 | // The process name. |
| 4255 | // Usually package name or process cmdline. |
| 4256 | // Provided by ActivityManagerService or read from /proc/PID/cmdline. |
Rafal Slawik | 3bea895 | 2018-11-15 12:39:33 +0000 | [diff] [blame] | 4257 | optional string process_name = 2; |
| 4258 | |
Rafal Slawik | 239b680 | 2019-09-09 18:46:01 +0100 | [diff] [blame] | 4259 | // Deprecated: use rss_high_water_mark_in_kilobytes instead. This field is |
| 4260 | // computed by converting kilobytes to bytes. |
| 4261 | optional int64 rss_high_water_mark_in_bytes = 3 [deprecated = true]; |
| 4262 | |
Rafal Slawik | 3bea895 | 2018-11-15 12:39:33 +0000 | [diff] [blame] | 4263 | // RSS high-water mark. Peak RSS usage of the process. Read from the VmHWM field in |
| 4264 | // /proc/PID/status. |
Rafal Slawik | 239b680 | 2019-09-09 18:46:01 +0100 | [diff] [blame] | 4265 | optional int32 rss_high_water_mark_in_kilobytes = 4; |
Rafal Slawik | 3bea895 | 2018-11-15 12:39:33 +0000 | [diff] [blame] | 4266 | } |
| 4267 | |
| 4268 | /* |
Rafal Slawik | 7efcefb | 2019-09-20 11:16:20 +0100 | [diff] [blame] | 4269 | * Logs the memory stats for a process. |
| 4270 | * |
| 4271 | * Pulled from StatsCompanionService for all managed processes (from ActivityManagerService) |
| 4272 | * and for selected native processes. |
| 4273 | */ |
| 4274 | message ProcessMemorySnapshot { |
| 4275 | // The uid if available. -1 means not available. |
| 4276 | optional int32 uid = 1 [(is_uid) = true]; |
| 4277 | |
| 4278 | // The process name. |
| 4279 | // Usually package name or process cmdline. |
| 4280 | // Provided by ActivityManagerService or read from /proc/PID/cmdline. |
| 4281 | optional string process_name = 2; |
| 4282 | |
| 4283 | // The pid of the process. |
| 4284 | // Allows to disambiguate instances of the process. |
| 4285 | optional int32 pid = 3; |
| 4286 | |
| 4287 | // The current OOM score adjustment value. |
| 4288 | // Read from ProcessRecord for managed processes. |
| 4289 | // Placeholder -1001 (OOM_SCORE_ADJ_MIN - 1, outside of allowed range) for native ones. |
| 4290 | optional int32 oom_score_adj = 4; |
| 4291 | |
| 4292 | // The current RSS of the process. |
| 4293 | // VmRSS from /proc/pid/status. |
| 4294 | optional int32 rss_in_kilobytes = 5; |
| 4295 | |
| 4296 | // The current anon RSS of the process. |
| 4297 | // RssAnon from /proc/pid/status. |
| 4298 | optional int32 anon_rss_in_kilobytes = 6; |
| 4299 | |
| 4300 | // The current swap size of the process. |
| 4301 | // VmSwap from /proc/pid/status. |
| 4302 | optional int32 swap_in_kilobytes = 7; |
| 4303 | |
| 4304 | // The sum of rss_in_kilobytes and swap_in_kilobytes. |
| 4305 | optional int32 anon_rss_and_swap_in_kilobytes = 8; |
| 4306 | } |
| 4307 | |
| 4308 | /* |
Chenjie Yu | 9d7720b | 2018-01-24 10:34:48 -0800 | [diff] [blame] | 4309 | * Elapsed real time from SystemClock. |
Chenjie Yu | 9da105b | 2018-01-13 12:41:08 -0800 | [diff] [blame] | 4310 | */ |
Chenjie Yu | 9d7720b | 2018-01-24 10:34:48 -0800 | [diff] [blame] | 4311 | message SystemElapsedRealtime { |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 4312 | optional uint64 time_millis = 1; |
Chenjie Yu | 9da105b | 2018-01-13 12:41:08 -0800 | [diff] [blame] | 4313 | } |
| 4314 | |
| 4315 | /* |
Chenjie Yu | 9d7720b | 2018-01-24 10:34:48 -0800 | [diff] [blame] | 4316 | * Up time from SystemClock. |
Chenjie Yu | 9da105b | 2018-01-13 12:41:08 -0800 | [diff] [blame] | 4317 | */ |
Chenjie Yu | 9d7720b | 2018-01-24 10:34:48 -0800 | [diff] [blame] | 4318 | message SystemUptime { |
| 4319 | // Milliseconds since the system was booted. |
| 4320 | // This clock stops when the system enters deep sleep (CPU off, display dark, device waiting |
| 4321 | // for external input). |
| 4322 | // 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] | 4323 | optional uint64 uptime_millis = 1; |
Chenjie Yu | 9da105b | 2018-01-13 12:41:08 -0800 | [diff] [blame] | 4324 | } |
| 4325 | |
| 4326 | /* |
| 4327 | * Reads from /proc/uid_concurrent_active_time which has the format: |
| 4328 | * active: X (X is # cores) |
| 4329 | * [uid0]: [time-0] [time-1] [time-2] ... (# entries = # cores) |
| 4330 | * [uid1]: [time-0] [time-1] [time-2] ... ... |
| 4331 | * ... |
| 4332 | * Time-N means the CPU time a UID spent running concurrently with N other processes. |
| 4333 | * The file contains a monotonically increasing count of time for a single boot. |
| 4334 | */ |
| 4335 | message CpuActiveTime { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 4336 | optional int32 uid = 1 [(is_uid) = true]; |
Chenjie Yu | ec67661 | 2018-03-07 09:19:17 -0800 | [diff] [blame] | 4337 | optional uint64 time_millis = 2; |
Chenjie Yu | 9da105b | 2018-01-13 12:41:08 -0800 | [diff] [blame] | 4338 | } |
| 4339 | |
| 4340 | /** |
| 4341 | * Reads from /proc/uid_concurrent_policy_time which has the format: |
| 4342 | * policy0: X policy4: Y (there are X cores on policy0, Y cores on policy4) |
| 4343 | * [uid0]: [time-0-0] [time-0-1] ... [time-1-0] [time-1-1] ... |
| 4344 | * [uid1]: [time-0-0] [time-0-1] ... [time-1-0] [time-1-1] ... |
| 4345 | * ... |
| 4346 | * Time-X-Y means the time a UID spent on clusterX running concurrently with Y other processes. |
| 4347 | * The file contains a monotonically increasing count of time for a single boot. |
| 4348 | */ |
| 4349 | message CpuClusterTime { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 4350 | optional int32 uid = 1 [(is_uid) = true]; |
Chenjie Yu | ec67661 | 2018-03-07 09:19:17 -0800 | [diff] [blame] | 4351 | optional int32 cluster_index = 2; |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 4352 | optional uint64 time_millis = 3; |
Chenjie Yu | 937d742 | 2018-01-10 16:37:53 -0800 | [diff] [blame] | 4353 | } |
| 4354 | |
| 4355 | /* |
| 4356 | * Pulls free disk space, for data, system partition and temporary directory. |
| 4357 | */ |
| 4358 | message DiskSpace { |
| 4359 | // available bytes in data partition |
| 4360 | optional uint64 data_available_bytes = 1; |
| 4361 | // available bytes in system partition |
| 4362 | optional uint64 system_available_bytes = 2; |
| 4363 | // available bytes in download cache or temp directories |
| 4364 | optional uint64 temp_available_bytes = 3; |
| 4365 | } |
Tej Singh | bf972d9 | 2018-01-10 20:51:13 -0800 | [diff] [blame] | 4366 | |
| 4367 | /** |
| 4368 | * Pulls battery coulomb counter, which is the remaining battery charge in uAh. |
Tej Singh | 9876a3b | 2019-01-11 14:28:35 -0800 | [diff] [blame] | 4369 | * |
| 4370 | * Pulled from StatsCompanionService.java |
Tej Singh | bf972d9 | 2018-01-10 20:51:13 -0800 | [diff] [blame] | 4371 | */ |
| 4372 | message RemainingBatteryCapacity { |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 4373 | optional int32 charge_micro_ampere_hour = 1; |
Tej Singh | bf972d9 | 2018-01-10 20:51:13 -0800 | [diff] [blame] | 4374 | } |
| 4375 | |
| 4376 | /** |
| 4377 | * Pulls battery capacity, which is the battery capacity when full in uAh. |
Tej Singh | 4029831 | 2018-02-16 00:15:09 -0800 | [diff] [blame] | 4378 | * Pulled from: |
| 4379 | * frameworks/base/cmds/statsd/src/external/ResourceHealthManagerPuller.cpp |
Tej Singh | bf972d9 | 2018-01-10 20:51:13 -0800 | [diff] [blame] | 4380 | */ |
| 4381 | message FullBatteryCapacity { |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 4382 | optional int32 capacity_micro_ampere_hour = 1; |
Tej Singh | 4029831 | 2018-02-16 00:15:09 -0800 | [diff] [blame] | 4383 | } |
| 4384 | |
| 4385 | /** |
Bookatz | 17f0d8a | 2018-09-13 12:56:32 -0700 | [diff] [blame] | 4386 | * Pulls battery voltage. |
| 4387 | * Pulled from: |
| 4388 | * frameworks/base/cmds/statsd/src/external/ResourceHealthManagerPuller.cpp |
| 4389 | */ |
| 4390 | message BatteryVoltage { |
| 4391 | // The voltage of the battery, in millivolts. |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 4392 | optional int32 voltage_millivolt = 1; |
Bookatz | 17f0d8a | 2018-09-13 12:56:32 -0700 | [diff] [blame] | 4393 | } |
| 4394 | |
| 4395 | /** |
Tej Singh | b1dbc8b | 2018-11-19 15:49:47 -0800 | [diff] [blame] | 4396 | * Pulls battery level (percent full, from 0 to 100). |
| 4397 | * |
| 4398 | * Pulled from: |
| 4399 | * frameworks/base/cmds/statsd/src/external/ResourceHealthManagerPuller.cpp |
| 4400 | */ |
| 4401 | message BatteryLevel { |
| 4402 | // Battery level. Should be in [0, 100]. |
| 4403 | optional int32 battery_level = 1; |
| 4404 | } |
| 4405 | |
| 4406 | /** |
Tej Singh | d89137e | 2018-03-26 14:51:40 -0700 | [diff] [blame] | 4407 | * Pulls the temperature of various parts of the device. |
| 4408 | * 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] | 4409 | * |
Maggie White | 442b631 | 2019-04-05 16:26:44 -0700 | [diff] [blame] | 4410 | * Pulled from StatsCompanionService.java |
Tej Singh | 4029831 | 2018-02-16 00:15:09 -0800 | [diff] [blame] | 4411 | */ |
| 4412 | message Temperature { |
Tej Singh | b6070b9 | 2018-12-19 19:00:12 -0800 | [diff] [blame] | 4413 | // The type of temperature being reported. Eg. CPU, GPU, SKIN, BATTERY, BCL_. |
Tej Singh | 4029831 | 2018-02-16 00:15:09 -0800 | [diff] [blame] | 4414 | optional android.os.TemperatureTypeEnum sensor_location = 1; |
| 4415 | |
| 4416 | // The name of the temperature source. Eg. CPU0 |
| 4417 | optional string sensor_name = 2; |
| 4418 | |
Tej Singh | d89137e | 2018-03-26 14:51:40 -0700 | [diff] [blame] | 4419 | // Temperature in tenths of a degree C. |
Tej Singh | b6070b9 | 2018-12-19 19:00:12 -0800 | [diff] [blame] | 4420 | // For BCL, it is decimillivolt, decimilliamps, and percentage * 10. |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 4421 | optional int32 temperature_deci_celsius = 3; |
Maggie White | 442b631 | 2019-04-05 16:26:44 -0700 | [diff] [blame] | 4422 | |
| 4423 | // Relative severity of the throttling, see enum definition. |
| 4424 | optional android.os.ThrottlingSeverityEnum severity = 4; |
yro | a1fe77c | 2018-02-26 14:22:54 -0800 | [diff] [blame] | 4425 | } |
Olivier Gaillard | 00bfb1b | 2018-07-10 11:25:09 +0100 | [diff] [blame] | 4426 | |
| 4427 | /** |
| 4428 | * Pulls the statistics of calls to Binder. |
| 4429 | * |
Olivier Gaillard | d25f7a8 | 2018-09-12 14:28:48 +0100 | [diff] [blame] | 4430 | * Binder stats will be reset every time the data is pulled. It means it can only be pulled by one |
| 4431 | * config on the device. |
Olivier Gaillard | 9ea238d | 2018-07-24 10:26:31 +0100 | [diff] [blame] | 4432 | * |
Olivier Gaillard | 720ec5b | 2018-10-30 17:32:56 +0000 | [diff] [blame] | 4433 | * Next tag: 15 |
Olivier Gaillard | 00bfb1b | 2018-07-10 11:25:09 +0100 | [diff] [blame] | 4434 | */ |
| 4435 | message BinderCalls { |
Olivier Gaillard | 720ec5b | 2018-10-30 17:32:56 +0000 | [diff] [blame] | 4436 | // UID of the process responsible for the binder transaction. It will be set if the process |
| 4437 | // executing the binder transaction attribute the transaction to another uid using |
| 4438 | // Binder.setThreadWorkSource(). |
| 4439 | // |
| 4440 | // If not set, the value will be -1. |
Olivier Gaillard | 9ea238d | 2018-07-24 10:26:31 +0100 | [diff] [blame] | 4441 | optional int32 uid = 1 [(is_uid) = true]; |
Olivier Gaillard | 720ec5b | 2018-10-30 17:32:56 +0000 | [diff] [blame] | 4442 | // UID of the process executing the binder transaction. |
| 4443 | optional int32 direct_caller_uid = 14; |
Olivier Gaillard | 9ea238d | 2018-07-24 10:26:31 +0100 | [diff] [blame] | 4444 | // Fully qualified class name of the API call. |
| 4445 | // |
| 4446 | // This is a system server class name. |
| 4447 | // |
| 4448 | // TODO(gaillard): figure out if binder call stats includes data from isolated uids, if a uid |
| 4449 | // gets recycled and we have isolated uids, we might attribute the data incorrectly. |
| 4450 | // TODO(gaillard): there is a high dimensions cardinality, figure out if we should drop the less |
| 4451 | // commonly used APIs. |
| 4452 | optional string service_class_name = 2; |
| 4453 | // Method name of the API call. It can also be a transaction code if we cannot |
| 4454 | // resolve it to a name. See Binder#getTransactionName. |
| 4455 | // |
| 4456 | // This is a system server method name. |
| 4457 | optional string service_method_name = 3; |
| 4458 | // Total number of API calls. |
| 4459 | optional int64 call_count = 4; |
| 4460 | // True if the screen was interactive PowerManager#isInteractive at the end of the call. |
| 4461 | optional bool screen_interactive = 13; |
| 4462 | // Total number of API calls we have data recorded for. If we collected data for all the calls, |
| 4463 | // call_count will be equal to recorded_call_count. |
| 4464 | // |
| 4465 | // If recorded_call_count is different than call_count, it means data collection has been |
| 4466 | // sampled. All the fields below will be sampled in this case. |
| 4467 | optional int64 recorded_call_count = 12; |
| 4468 | // Number of exceptions thrown by the API. |
| 4469 | optional int64 recorded_exception_count = 5; |
| 4470 | // Total latency of all API calls. |
| 4471 | // Average can be computed using total_latency_micros / recorded_call_count. |
| 4472 | optional int64 recorded_total_latency_micros = 6; |
| 4473 | // Maximum latency of one API call. |
| 4474 | optional int64 recorded_max_latency_micros = 7; |
| 4475 | // Total CPU usage of all API calls. |
| 4476 | // Average can be computed using total_cpu_micros / recorded_call_count. |
| 4477 | // Total can be computed using total_cpu_micros / recorded_call_count * call_count. |
| 4478 | optional int64 recorded_total_cpu_micros = 8; |
| 4479 | // Maximum CPU usage of one API call. |
| 4480 | optional int64 recorded_max_cpu_micros = 9; |
| 4481 | // Maximum parcel reply size of one API call. |
| 4482 | optional int64 recorded_max_reply_size_bytes = 10; |
| 4483 | // Maximum parcel request size of one API call. |
| 4484 | optional int64 recorded_max_request_size_bytes = 11; |
| 4485 | } |
| 4486 | |
| 4487 | /** |
| 4488 | * Pulls the statistics of exceptions during calls to Binder. |
| 4489 | * |
| 4490 | * Binder stats are cumulative from boot unless somebody reset the data using |
| 4491 | * > adb shell dumpsys binder_calls_stats --reset |
| 4492 | */ |
| 4493 | message BinderCallsExceptions { |
| 4494 | // Exception class name, e.g. java.lang.IllegalArgumentException. |
| 4495 | // |
| 4496 | // This is an exception class name thrown by the system server. |
| 4497 | optional string exception_class_name = 1; |
| 4498 | // Total number of exceptions. |
| 4499 | optional int64 exception_count = 2; |
Olivier Gaillard | 00bfb1b | 2018-07-10 11:25:09 +0100 | [diff] [blame] | 4500 | } |
Marcin Oczeretko | d8cc859 | 2018-08-22 16:07:36 +0100 | [diff] [blame] | 4501 | |
Marcin Oczeretko | 3e6494e | 2018-09-10 18:06:52 +0100 | [diff] [blame] | 4502 | /** |
| 4503 | * Pulls the statistics of message dispatching on HandlerThreads. |
| 4504 | * |
| 4505 | * Looper stats will be reset every time the data is pulled. It means it can only be pulled by one |
| 4506 | * config on the device. |
| 4507 | * |
| 4508 | * Next tag: 11 |
| 4509 | */ |
Marcin Oczeretko | d8cc859 | 2018-08-22 16:07:36 +0100 | [diff] [blame] | 4510 | message LooperStats { |
Marcin Oczeretko | ec75872 | 2018-09-12 12:53:47 +0100 | [diff] [blame] | 4511 | // 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] | 4512 | optional int32 uid = 1 [(is_uid) = true]; |
| 4513 | |
| 4514 | // Fully qualified class name of the handler target class. |
| 4515 | // |
| 4516 | // This field does not contain PII. This is a system server class name. |
| 4517 | optional string handler_class_name = 2; |
| 4518 | |
| 4519 | // The name of the thread that runs the Looper. |
| 4520 | // |
| 4521 | // This field does not contain PII. This is a system server thread name. |
| 4522 | optional string looper_thread_name = 3; |
| 4523 | |
| 4524 | // The name of the dispatched message. |
| 4525 | // |
| 4526 | // This field does not contain PII. This is a system server constant or class |
| 4527 | // name. |
| 4528 | optional string message_name = 4; |
| 4529 | |
| 4530 | // Total number of successfully dispatched messages. |
| 4531 | optional int64 message_count = 5; |
| 4532 | |
| 4533 | // Total number of messages that failed dispatching. |
| 4534 | optional int64 exception_count = 6; |
| 4535 | |
| 4536 | // Total number of processed messages we have data recorded for. If we |
| 4537 | // collected data for all the messages, message_count will be equal to |
| 4538 | // recorded_message_count. |
| 4539 | // |
| 4540 | // If recorded_message_count is different than message_count, it means data |
Marcin Oczeretko | c06331a | 2018-10-02 13:00:38 +0100 | [diff] [blame] | 4541 | // 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] | 4542 | optional int64 recorded_message_count = 7; |
| 4543 | |
| 4544 | // Total latency of all processed messages. |
| 4545 | // Average can be computed using recorded_total_latency_micros / |
| 4546 | // recorded_message_count. |
| 4547 | optional int64 recorded_total_latency_micros = 8; |
| 4548 | |
| 4549 | // Total CPU usage of all processed message. |
| 4550 | // Average can be computed using recorded_total_cpu_micros / |
| 4551 | // recorded_message_count. Total can be computed using |
Marcin Oczeretko | 3e6494e | 2018-09-10 18:06:52 +0100 | [diff] [blame] | 4552 | // recorded_total_cpu_micros / recorded_message_count * message_count. |
Marcin Oczeretko | d8cc859 | 2018-08-22 16:07:36 +0100 | [diff] [blame] | 4553 | optional int64 recorded_total_cpu_micros = 9; |
Marcin Oczeretko | 3e6494e | 2018-09-10 18:06:52 +0100 | [diff] [blame] | 4554 | |
| 4555 | // True if the screen was interactive PowerManager#isInteractive at the end of the call. |
| 4556 | optional bool screen_interactive = 10; |
Marcin Oczeretko | c06331a | 2018-10-02 13:00:38 +0100 | [diff] [blame] | 4557 | |
| 4558 | // Max recorded CPU usage of all processed messages. |
| 4559 | optional int64 recorded_max_cpu_micros = 11; |
| 4560 | |
| 4561 | // Max recorded latency of all processed messages. |
| 4562 | optional int64 recorded_max_latency_micros = 12; |
| 4563 | |
| 4564 | // Total number of messages we tracked the dispatching delay for. If we |
| 4565 | // collected data for all the messages, message_count will be equal to |
| 4566 | // recorded_delay_message_count. |
| 4567 | // |
| 4568 | // If recorded_delay_message_count is different than message_count, it means data |
| 4569 | // collection has been sampled or/and not all messages specified the target dispatch time. |
| 4570 | // The fields below will be sampled in this case. |
| 4571 | optional int64 recorded_delay_message_count = 13; |
| 4572 | |
| 4573 | // Total dispatching delay of all processed messages. |
| 4574 | // Calculated as a difference between the target dispatching time (Message.when) |
| 4575 | // and the actual dispatching time. |
| 4576 | // Average can be computed using recorded_total_delay_millis / recorded_delay_message_count. |
| 4577 | optional int64 recorded_total_delay_millis = 14; |
| 4578 | |
| 4579 | // Max dispatching delay of all processed messages. |
| 4580 | // Calculated as a difference between the target dispatching time (Message.when) |
| 4581 | // and the actual dispatching time. |
| 4582 | optional int64 recorded_max_delay_millis = 15; |
Marcin Oczeretko | d8cc859 | 2018-08-22 16:07:36 +0100 | [diff] [blame] | 4583 | } |
Tej Singh | 86dc9db | 2018-09-06 00:39:57 +0000 | [diff] [blame] | 4584 | |
| 4585 | /** |
| 4586 | * Pulls disk information, such as write speed and latency. |
| 4587 | */ |
| 4588 | message DiskStats { |
| 4589 | // Time taken to open, write 512B to, and close a file. |
| 4590 | // -1 if error performing the check. |
| 4591 | optional int64 data_write_latency_millis = 1; |
| 4592 | |
| 4593 | optional bool file_based_encryption = 2; |
| 4594 | |
| 4595 | // Recent disk write speed in kB/s. |
| 4596 | // -1 if error querying storageed. |
| 4597 | // 0 if data is unavailable. |
| 4598 | optional int32 recent_disk_write_speed = 3; |
| 4599 | } |
| 4600 | |
| 4601 | |
| 4602 | /** |
| 4603 | * Free and total bytes of the Data, Cache, and System partition. |
| 4604 | */ |
| 4605 | message DirectoryUsage { |
| 4606 | enum Directory { |
| 4607 | UNKNOWN = 0; |
| 4608 | DATA = 1; |
| 4609 | CACHE = 2; |
| 4610 | SYSTEM = 3; |
| 4611 | } |
| 4612 | optional Directory directory = 1; |
| 4613 | optional int64 free_bytes = 2; |
| 4614 | optional int64 total_bytes = 3; |
| 4615 | } |
| 4616 | |
| 4617 | |
| 4618 | /** |
| 4619 | * Size of an application: apk size, data size, and cache size. |
| 4620 | * Reads from a cached file produced daily by DiskStatsLoggingService.java. |
| 4621 | * Information is only reported for apps with the primary user (user 0). |
| 4622 | * Sizes are aggregated by package name. |
| 4623 | */ |
| 4624 | message AppSize { |
| 4625 | // Including uids will involve modifying diskstats logic. |
| 4626 | optional string package_name = 1; |
| 4627 | // App size in bytes. -1 if unavailable. |
| 4628 | optional int64 app_size_bytes = 2; |
| 4629 | // App data size in bytes. -1 if unavailable. |
| 4630 | optional int64 app_data_size_bytes = 3; |
| 4631 | // App cache size in bytes. -1 if unavailable. |
| 4632 | optional int64 app_cache_size_bytes = 4; |
| 4633 | // Time that the cache file was produced. |
| 4634 | // Uses System.currentTimeMillis(), which is wall clock time. |
| 4635 | optional int64 cache_time_millis = 5; |
| 4636 | } |
| 4637 | |
| 4638 | |
| 4639 | /** |
| 4640 | * Size of a particular category. Eg: photos, videos. |
| 4641 | * Reads from a cached file produced daily by DiskStatsLoggingService.java. |
| 4642 | */ |
| 4643 | message CategorySize { |
| 4644 | enum Category { |
| 4645 | UNKNOWN = 0; |
| 4646 | APP_SIZE = 1; |
| 4647 | APP_DATA_SIZE = 2; |
| 4648 | APP_CACHE_SIZE = 3; |
| 4649 | PHOTOS = 4; |
| 4650 | VIDEOS = 5; |
| 4651 | AUDIO = 6; |
| 4652 | DOWNLOADS = 7; |
| 4653 | SYSTEM = 8; |
| 4654 | OTHER = 9; |
| 4655 | } |
| 4656 | optional Category category = 1; |
| 4657 | // Category size in bytes. |
| 4658 | optional int64 size_bytes = 2; |
| 4659 | // Time that the cache file was produced. |
| 4660 | // Uses System.currentTimeMillis(), which is wall clock time. |
| 4661 | optional int64 cache_time_millis = 3; |
| 4662 | } |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 4663 | |
| 4664 | /** |
Tej Singh | e7726dc | 2018-09-21 11:42:12 -0700 | [diff] [blame] | 4665 | * Pulls per uid I/O stats. The stats are cumulative since boot. |
| 4666 | * |
| 4667 | * Read/write bytes are I/O events from a storage device |
| 4668 | * Read/write chars are data requested by read/write syscalls, and can be |
| 4669 | * satisfied by caching. |
| 4670 | * |
| 4671 | * Pulled from StatsCompanionService, which reads proc/uid_io/stats. |
| 4672 | */ |
| 4673 | message DiskIo { |
| 4674 | optional int32 uid = 1 [(is_uid) = true]; |
| 4675 | optional int64 fg_chars_read = 2; |
| 4676 | optional int64 fg_chars_write = 3; |
| 4677 | optional int64 fg_bytes_read = 4; |
| 4678 | optional int64 fg_bytes_write = 5; |
| 4679 | optional int64 bg_chars_read = 6; |
| 4680 | optional int64 bg_chars_write = 7; |
| 4681 | optional int64 bg_bytes_read = 8; |
| 4682 | optional int64 bg_bytes_write = 9; |
| 4683 | optional int64 fg_fsync = 10; |
| 4684 | optional int64 bg_fsync= 11; |
| 4685 | } |
| 4686 | |
| 4687 | |
| 4688 | /** |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 4689 | * Pulls the number of fingerprints for each user. |
| 4690 | * |
Kevin Chyn | 1741a07 | 2019-01-17 11:54:40 -0800 | [diff] [blame] | 4691 | * Pulled from StatsCompanionService, which queries <Biometric>Manager. |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 4692 | */ |
joshmccloskey | 5dcb408 | 2019-02-26 15:28:37 -0800 | [diff] [blame] | 4693 | message NumFingerprintsEnrolled { |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 4694 | // The associated user. Eg: 0 for owners, 10+ for others. |
| 4695 | // Defined in android/os/UserHandle.java |
| 4696 | optional int32 user = 1; |
| 4697 | // Number of fingerprints registered to that user. |
joshmccloskey | 5dcb408 | 2019-02-26 15:28:37 -0800 | [diff] [blame] | 4698 | optional int32 num_fingerprints_enrolled = 2; |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 4699 | } |
Chenjie Yu | 12e5e67 | 2018-09-14 15:54:59 -0700 | [diff] [blame] | 4700 | |
Philip P. Moltmann | 70b42ae | 2019-01-29 16:24:19 -0800 | [diff] [blame] | 4701 | /** |
joshmccloskey | 5dcb408 | 2019-02-26 15:28:37 -0800 | [diff] [blame] | 4702 | * Pulls the number of faces for each user. |
| 4703 | * |
| 4704 | * Pulled from StatsCompanionService, which queries <Biometric>Manager. |
| 4705 | */ |
| 4706 | message NumFacesEnrolled { |
| 4707 | // The associated user. Eg: 0 for owners, 10+ for others. |
| 4708 | // Defined in android/os/UserHandle.java |
| 4709 | optional int32 user = 1; |
| 4710 | // Number of faces registered to that user. |
| 4711 | optional int32 num_faces_enrolled = 2; |
| 4712 | } |
| 4713 | /** |
Philip P. Moltmann | 70b42ae | 2019-01-29 16:24:19 -0800 | [diff] [blame] | 4714 | * A mapping of role holder -> role |
| 4715 | */ |
| 4716 | message RoleHolder { |
| 4717 | // uid of the role holder |
| 4718 | optional int32 uid = 1 [(is_uid) = true]; |
| 4719 | |
| 4720 | // package name of the role holder |
| 4721 | optional string package_name = 2; |
| 4722 | |
| 4723 | // the role held |
| 4724 | optional string role = 3; |
| 4725 | } |
| 4726 | |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 4727 | message AggStats { |
| 4728 | optional int64 min = 1; |
| 4729 | |
| 4730 | optional int64 average = 2; |
| 4731 | |
| 4732 | optional int64 max = 3; |
| 4733 | } |
| 4734 | |
| 4735 | message ProcessStatsStateProto { |
| 4736 | optional android.service.procstats.ScreenState screen_state = 1; |
| 4737 | |
| 4738 | optional android.service.procstats.MemoryState memory_state = 2; |
| 4739 | |
| 4740 | // this enum list is from frameworks/base/core/java/com/android/internal/app/procstats/ProcessStats.java |
| 4741 | // and not frameworks/base/core/java/android/app/ActivityManager.java |
| 4742 | optional android.service.procstats.ProcessState process_state = 3; |
| 4743 | |
| 4744 | // Millisecond uptime duration spent in this state |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 4745 | optional int64 duration_millis = 4; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 4746 | |
| 4747 | // Millisecond elapsed realtime duration spent in this state |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 4748 | optional int64 realtime_duration_millis = 9; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 4749 | |
| 4750 | // # of samples taken |
| 4751 | optional int32 sample_size = 5; |
| 4752 | |
| 4753 | // PSS is memory reserved for this process |
| 4754 | optional AggStats pss = 6; |
| 4755 | |
| 4756 | // USS is memory shared between processes, divided evenly for accounting |
| 4757 | optional AggStats uss = 7; |
| 4758 | |
| 4759 | // RSS is memory resident for this process |
| 4760 | optional AggStats rss = 8; |
| 4761 | } |
| 4762 | |
| 4763 | // Next Tag: 7 |
| 4764 | message ProcessStatsProto { |
| 4765 | // Name of process. |
| 4766 | optional string process = 1; |
| 4767 | |
| 4768 | // Uid of the process. |
| 4769 | optional int32 uid = 2; |
| 4770 | |
| 4771 | // Information about how often kills occurred |
| 4772 | message Kill { |
| 4773 | // Count of excessive CPU kills |
| 4774 | optional int32 cpu = 1; |
| 4775 | |
| 4776 | // Count of kills when cached |
| 4777 | optional int32 cached = 2; |
| 4778 | |
| 4779 | // PSS stats during cached kill |
| 4780 | optional AggStats cached_pss = 3; |
| 4781 | } |
| 4782 | optional Kill kill = 3; |
| 4783 | |
| 4784 | // Time and memory spent in various states. |
| 4785 | repeated ProcessStatsStateProto states = 5; |
| 4786 | |
| 4787 | // Total time process has been running... screen_state, memory_state, and process_state |
| 4788 | // will not be set. |
| 4789 | optional ProcessStatsStateProto total_running_state = 6; |
| 4790 | } |
| 4791 | |
| 4792 | message PackageServiceOperationStatsProto { |
| 4793 | // Operate enum: Started, Foreground, Bound, Executing |
| 4794 | optional android.service.procstats.ServiceOperationState operation = 1; |
| 4795 | |
| 4796 | // Number of times the service was in this operation. |
| 4797 | optional int32 count = 2; |
| 4798 | |
| 4799 | // Information about a state the service can be in. |
| 4800 | message StateStats { |
| 4801 | // Screen state enum. |
| 4802 | optional android.service.procstats.ScreenState screen_state = 1; |
| 4803 | // Memory state enum. |
| 4804 | optional android.service.procstats.MemoryState memory_state = 2; |
| 4805 | |
| 4806 | // duration in milliseconds. |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 4807 | optional int64 duration_millis = 3; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 4808 | // Millisecond elapsed realtime duration spent in this state |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 4809 | optional int64 realtime_duration_millis = 4; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 4810 | } |
| 4811 | repeated StateStats state_stats = 3; |
| 4812 | } |
| 4813 | |
| 4814 | message PackageServiceStatsProto { |
| 4815 | // Name of service component. |
| 4816 | optional string service_name = 1; |
| 4817 | |
| 4818 | // The operation stats. |
| 4819 | // The package_name, package_uid, package_version, service_name will not be set to save space. |
| 4820 | repeated PackageServiceOperationStatsProto operation_stats = 2; |
| 4821 | } |
| 4822 | |
| 4823 | message PackageAssociationSourceProcessStatsProto { |
| 4824 | // Uid of the process. |
| 4825 | optional int32 process_uid = 1; |
| 4826 | // Process name. |
| 4827 | optional string process_name = 2; |
Chenjie Yu | b2ecc79 | 2019-01-17 10:27:26 -0800 | [diff] [blame] | 4828 | // Package name. |
| 4829 | optional string package_name = 7; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 4830 | // Total count of the times this association appeared. |
| 4831 | optional int32 total_count = 3; |
| 4832 | |
| 4833 | // Millisecond uptime total duration this association was around. |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 4834 | optional int64 total_duration_millis = 4; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 4835 | |
| 4836 | // Total count of the times this association became actively impacting its target process. |
| 4837 | optional int32 active_count = 5; |
| 4838 | |
| 4839 | // Information on one source in this association. |
| 4840 | message StateStats { |
| 4841 | // Process state enum. |
| 4842 | optional android.service.procstats.ProcessState process_state = 1; |
| 4843 | // Millisecond uptime duration spent in this state |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 4844 | optional int64 duration_millis = 2; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 4845 | // Millisecond elapsed realtime duration spent in this state |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 4846 | optional int64 realtime_duration_mmillis = 3; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 4847 | } |
| 4848 | repeated StateStats active_state_stats = 6; |
| 4849 | } |
| 4850 | |
| 4851 | message PackageAssociationProcessStatsProto { |
| 4852 | // Name of the target component. |
| 4853 | optional string component_name = 1; |
| 4854 | // Information on one source in this association. |
| 4855 | repeated PackageAssociationSourceProcessStatsProto sources = 2; |
| 4856 | } |
| 4857 | |
| 4858 | |
| 4859 | message ProcessStatsPackageProto { |
| 4860 | // Name of package. |
| 4861 | optional string package = 1; |
| 4862 | |
| 4863 | // Uid of the package. |
| 4864 | optional int32 uid = 2; |
| 4865 | |
| 4866 | // Version of the package. |
| 4867 | optional int64 version = 3; |
| 4868 | |
| 4869 | // Stats for each process running with the package loaded in to it. |
| 4870 | repeated ProcessStatsProto process_stats = 4; |
| 4871 | |
| 4872 | // Stats for each of the package's services. |
| 4873 | repeated PackageServiceStatsProto service_stats = 5; |
| 4874 | |
| 4875 | // Stats for each association with the package. |
| 4876 | repeated PackageAssociationProcessStatsProto association_stats = 6; |
| 4877 | } |
| 4878 | |
| 4879 | message ProcessStatsSectionProto { |
| 4880 | // Elapsed realtime at start of report. |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 4881 | optional int64 start_realtime_millis = 1; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 4882 | |
| 4883 | // Elapsed realtime at end of report. |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 4884 | optional int64 end_realtime_millis = 2; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 4885 | |
| 4886 | // CPU uptime at start of report. |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 4887 | optional int64 start_uptime_millis = 3; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 4888 | |
| 4889 | // CPU uptime at end of report. |
Yangster-mac | a8a3044 | 2018-10-13 23:46:34 -0700 | [diff] [blame] | 4890 | optional int64 end_uptime_millis = 4; |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 4891 | |
| 4892 | // System runtime library. e.g. "libdvm.so", "libart.so". |
| 4893 | optional string runtime = 5; |
| 4894 | |
| 4895 | // whether kernel reports swapped pss. |
| 4896 | optional bool has_swapped_pss = 6; |
| 4897 | |
| 4898 | // Data completeness. e.g. "complete", "partial", shutdown", or "sysprops". |
| 4899 | enum Status { |
| 4900 | STATUS_UNKNOWN = 0; |
| 4901 | STATUS_COMPLETE = 1; |
| 4902 | STATUS_PARTIAL = 2; |
| 4903 | STATUS_SHUTDOWN = 3; |
| 4904 | STATUS_SYSPROPS = 4; |
| 4905 | } |
| 4906 | repeated Status status = 7; |
| 4907 | |
Chenjie Yu | b2ecc79 | 2019-01-17 10:27:26 -0800 | [diff] [blame] | 4908 | // Number of pages available of various types and sizes, representation fragmentation. |
| 4909 | repeated ProcessStatsAvailablePagesProto available_pages = 10; |
| 4910 | |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 4911 | // Stats for each process. |
| 4912 | repeated ProcessStatsProto process_stats = 8; |
| 4913 | |
| 4914 | // Stats for each package. |
| 4915 | repeated ProcessStatsPackageProto package_stats = 9; |
| 4916 | } |
| 4917 | |
Chenjie Yu | b2ecc79 | 2019-01-17 10:27:26 -0800 | [diff] [blame] | 4918 | message ProcessStatsAvailablePagesProto { |
| 4919 | // Node these pages are in (as per /proc/pagetypeinfo) |
| 4920 | optional int32 node = 1; |
| 4921 | |
| 4922 | // Zone these pages are in (as per /proc/pagetypeinfo) |
| 4923 | optional string zone = 2; |
| 4924 | |
| 4925 | // Label for the type of these pages (as per /proc/pagetypeinfo) |
| 4926 | optional string label = 3; |
| 4927 | |
| 4928 | // Distribution of number of pages available by order size. First entry in array is |
| 4929 | // order 0, second is order 1, etc. Each order increase is a doubling of page size. |
| 4930 | repeated int32 pages_per_order = 4; |
| 4931 | } |
| 4932 | |
Chenjie Yu | 12e5e67 | 2018-09-14 15:54:59 -0700 | [diff] [blame] | 4933 | /** |
| 4934 | * Pulled from ProcessStatsService.java |
| 4935 | */ |
| 4936 | message ProcStats { |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 4937 | optional ProcessStatsSectionProto proc_stats_section = 1; |
| 4938 | } |
| 4939 | |
Chenjie Yu | f910b780 | 2019-01-11 16:08:20 -0800 | [diff] [blame] | 4940 | /** |
| 4941 | * Pulled from ProcessStatsService.java |
| 4942 | */ |
| 4943 | message ProcStatsPkgProc { |
| 4944 | optional ProcessStatsSectionProto proc_stats_section = 1; |
| 4945 | } |
| 4946 | |
Chris Wren | cdea3b7 | 2019-11-22 16:58:17 -0500 | [diff] [blame] | 4947 | // Next Tag: 2 |
| 4948 | message PackageRemoteViewInfoProto { |
| 4949 | optional string package_name = 1; |
| 4950 | // add per-package additional info here (like channels) |
| 4951 | } |
| 4952 | |
| 4953 | // Next Tag: 2 |
| 4954 | message NotificationRemoteViewsProto { |
| 4955 | repeated PackageRemoteViewInfoProto package_remote_view_info = 1; |
| 4956 | } |
| 4957 | |
| 4958 | /** |
| 4959 | * Pulled from NotificationManagerService.java |
| 4960 | */ |
| 4961 | message NotificationRemoteViews { |
| 4962 | optional NotificationRemoteViewsProto notification_remote_views = 1; |
| 4963 | } |
| 4964 | |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 4965 | message PowerProfileProto { |
| 4966 | optional double cpu_suspend = 1; |
| 4967 | |
| 4968 | optional double cpu_idle = 2; |
| 4969 | |
| 4970 | optional double cpu_active = 3; |
| 4971 | |
| 4972 | message CpuCluster { |
| 4973 | optional int32 id = 1; |
| 4974 | optional double cluster_power = 2; |
| 4975 | optional int32 cores = 3; |
| 4976 | repeated int64 speed = 4; |
| 4977 | repeated double core_power = 5; |
| 4978 | } |
| 4979 | |
| 4980 | repeated CpuCluster cpu_cluster = 40; |
| 4981 | |
| 4982 | optional double wifi_scan = 4; |
| 4983 | |
| 4984 | optional double wifi_on = 5; |
| 4985 | |
| 4986 | optional double wifi_active = 6; |
| 4987 | |
| 4988 | optional double wifi_controller_idle = 7; |
| 4989 | |
| 4990 | optional double wifi_controller_rx = 8; |
| 4991 | |
| 4992 | optional double wifi_controller_tx = 9; |
| 4993 | |
| 4994 | repeated double wifi_controller_tx_levels = 10; |
| 4995 | |
| 4996 | optional double wifi_controller_operating_voltage = 11; |
| 4997 | |
| 4998 | optional double bluetooth_controller_idle = 12; |
| 4999 | |
| 5000 | optional double bluetooth_controller_rx = 13; |
| 5001 | |
| 5002 | optional double bluetooth_controller_tx = 14; |
| 5003 | |
| 5004 | optional double bluetooth_controller_operating_voltage = 15; |
| 5005 | |
| 5006 | optional double modem_controller_sleep = 16; |
| 5007 | |
| 5008 | optional double modem_controller_idle = 17; |
| 5009 | |
| 5010 | optional double modem_controller_rx = 18; |
| 5011 | |
| 5012 | repeated double modem_controller_tx = 19; |
| 5013 | |
| 5014 | optional double modem_controller_operating_voltage = 20; |
| 5015 | |
| 5016 | optional double gps_on = 21; |
| 5017 | |
| 5018 | repeated double gps_signal_quality_based = 22; |
| 5019 | |
| 5020 | optional double gps_operating_voltage = 23; |
| 5021 | |
| 5022 | optional double bluetooth_on = 24; |
| 5023 | |
| 5024 | optional double bluetooth_active = 25; |
| 5025 | |
| 5026 | optional double bluetooth_at_cmd = 26; |
| 5027 | |
| 5028 | optional double ambient_display = 27; |
| 5029 | |
| 5030 | optional double screen_on = 28; |
| 5031 | |
| 5032 | optional double radio_on = 29; |
| 5033 | |
| 5034 | optional double radio_scanning = 30; |
| 5035 | |
| 5036 | optional double radio_active = 31; |
| 5037 | |
| 5038 | optional double screen_full = 32; |
| 5039 | |
| 5040 | optional double audio = 33; |
| 5041 | |
| 5042 | optional double video = 34; |
| 5043 | |
| 5044 | optional double flashlight = 35; |
| 5045 | |
| 5046 | optional double memory = 36; |
| 5047 | |
| 5048 | optional double camera = 37; |
| 5049 | |
| 5050 | optional double wifi_batched_scan = 38; |
| 5051 | |
| 5052 | optional double battery_capacity = 39; |
Chenjie Yu | 12e5e67 | 2018-09-14 15:54:59 -0700 | [diff] [blame] | 5053 | } |
Chenjie Yu | ab53020 | 2018-09-26 12:39:20 -0700 | [diff] [blame] | 5054 | |
| 5055 | /** |
| 5056 | * power_profile.xml and other constants for power model calculations. |
| 5057 | * Pulled from PowerProfile.java |
| 5058 | */ |
| 5059 | message PowerProfile { |
Yangster | af9aee7 | 2018-10-12 09:26:16 -0700 | [diff] [blame] | 5060 | optional PowerProfileProto power_profile = 1; |
Howard Ro | 9a862de | 2018-10-11 16:03:33 -0700 | [diff] [blame] | 5061 | } |
Chenjie Yu | b35b5f7 | 2018-10-13 23:25:11 -0700 | [diff] [blame] | 5062 | |
| 5063 | /** |
arangelov | d5db50e | 2018-10-12 20:24:39 +0100 | [diff] [blame] | 5064 | * Logs when a user restriction was added or removed. |
| 5065 | * |
| 5066 | * Logged from: |
| 5067 | * frameworks/base/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java |
| 5068 | */ |
| 5069 | message UserRestrictionChanged { |
| 5070 | // The raw string of the user restriction as defined in UserManager. |
| 5071 | // Allowed values are defined in UserRestrictionsUtils#USER_RESTRICTIONS. |
| 5072 | optional string restriction = 1; |
| 5073 | // Whether the restriction is enabled or disabled. |
| 5074 | optional bool enabled = 2; |
Howard Ro | 183c2bd | 2018-10-18 13:52:10 -0700 | [diff] [blame] | 5075 | } |
Yangster-mac | 308ea0c | 2018-10-22 13:10:25 -0700 | [diff] [blame] | 5076 | |
| 5077 | /** |
| 5078 | * Pulls process user time and system time. Puller takes a snapshot of all pids |
| 5079 | * in the system and returns cpu stats for those that are working at the time. |
| 5080 | * Dead pids will be dropped. Kernel processes are excluded. |
| 5081 | * Min cool-down is 5 sec. |
| 5082 | */ |
| 5083 | message ProcessCpuTime { |
| 5084 | optional int32 uid = 1 [(is_uid) = true]; |
| 5085 | |
| 5086 | optional string process_name = 2; |
| 5087 | // Process cpu time in user space, cumulative from boot/process start |
| 5088 | optional int64 user_time_millis = 3; |
| 5089 | // Process cpu time in system space, cumulative from boot/process start |
| 5090 | optional int64 system_time_millis = 4; |
Rafal Slawik | bf67d07 | 2018-10-23 11:07:54 +0100 | [diff] [blame] | 5091 | } |
Misha Wagner | 5a51e00 | 2018-10-03 15:04:09 +0100 | [diff] [blame] | 5092 | |
| 5093 | /** |
| 5094 | * Pulls the CPU usage for each thread. |
| 5095 | * |
| 5096 | * Read from /proc/$PID/task/$TID/time_in_state files. |
| 5097 | * |
| 5098 | * TODO(mishaw): This is an experimental atom. Issues with big/little CPU frequencies, and |
| 5099 | * time_in_state files not being present on some phones, have not been addressed. These should be |
| 5100 | * considered before a public release. |
| 5101 | */ |
| 5102 | message CpuTimePerThreadFreq { |
| 5103 | // UID that owns the process. |
| 5104 | optional int32 uid = 1 [(is_uid) = true]; |
| 5105 | // ID of the process. |
Misha Wagner | dfa548c | 2018-11-16 11:18:00 +0000 | [diff] [blame] | 5106 | optional int32 process_id = 2; |
Misha Wagner | 5a51e00 | 2018-10-03 15:04:09 +0100 | [diff] [blame] | 5107 | // ID of the thread. |
Misha Wagner | dfa548c | 2018-11-16 11:18:00 +0000 | [diff] [blame] | 5108 | optional int32 thread_id = 3; |
Misha Wagner | 5a51e00 | 2018-10-03 15:04:09 +0100 | [diff] [blame] | 5109 | // Name of the process taken from `/proc/$PID/cmdline`. |
| 5110 | optional string process_name = 4; |
| 5111 | // Name of the thread taken from `/proc/$PID/task/$TID/comm` |
| 5112 | optional string thread_name = 5; |
Misha Wagner | fde6958 | 2018-11-28 13:26:32 +0000 | [diff] [blame] | 5113 | |
| 5114 | // Report eight different frequencies, and how much time is spent in each frequency. Frequencies |
| 5115 | // are given in KHz, and time is given in milliseconds since the thread started. All eight |
| 5116 | // frequencies are given here as the alternative is sending eight separate atoms. This method |
| 5117 | // significantly reduces the amount of data created |
| 5118 | optional int32 frequency1_khz = 6; |
| 5119 | optional int32 time1_millis = 7; |
| 5120 | optional int32 frequency2_khz = 8; |
| 5121 | optional int32 time2_millis = 9; |
| 5122 | optional int32 frequency3_khz = 10; |
| 5123 | optional int32 time3_millis = 11; |
| 5124 | optional int32 frequency4_khz = 12; |
| 5125 | optional int32 time4_millis = 13; |
| 5126 | optional int32 frequency5_khz = 14; |
| 5127 | optional int32 time5_millis = 15; |
| 5128 | optional int32 frequency6_khz = 16; |
| 5129 | optional int32 time6_millis = 17; |
| 5130 | optional int32 frequency7_khz = 18; |
| 5131 | optional int32 time7_millis = 19; |
| 5132 | optional int32 frequency8_khz = 20; |
| 5133 | optional int32 time8_millis = 21; |
Misha Wagner | 5a51e00 | 2018-10-03 15:04:09 +0100 | [diff] [blame] | 5134 | } |
Bookatz | 75ee6042 | 2018-11-09 12:27:37 -0800 | [diff] [blame] | 5135 | |
| 5136 | /** |
Bookatz | 366a443 | 2018-11-20 09:42:33 -0800 | [diff] [blame] | 5137 | * Pulls information about the device's build. |
| 5138 | */ |
| 5139 | message BuildInformation { |
| 5140 | // Build.FINGERPRINT. A string that uniquely identifies this build. Do not parse. |
| 5141 | // E.g. may be composed of the brand, product, device, release, id, incremental, type, and tags. |
| 5142 | optional string fingerprint = 1; |
| 5143 | |
| 5144 | // Build.BRAND. The consumer-visible brand with which the product/hardware will be associated. |
| 5145 | optional string brand = 2; |
| 5146 | |
| 5147 | // Build.PRODUCT. The name of the overall product. |
| 5148 | optional string product = 3; |
| 5149 | |
| 5150 | // Build.DEVICE. The name of the industrial design. |
| 5151 | optional string device = 4; |
| 5152 | |
| 5153 | // Build.VERSION.RELEASE. The user-visible version string. E.g., "1.0" or "3.4b5" or "bananas". |
| 5154 | optional string version_release = 5; |
| 5155 | |
| 5156 | // Build.ID. E.g. a label like "M4-rc20". |
| 5157 | optional string id = 6; |
| 5158 | |
| 5159 | // Build.VERSION.INCREMENTAL. The internal value used by the underlying source control to |
| 5160 | // represent this build. |
| 5161 | optional string version_incremental = 7; |
| 5162 | |
| 5163 | // Build.TYPE. The type of build, like "user" or "eng". |
| 5164 | optional string type = 8; |
| 5165 | |
| 5166 | // Build.TAGS. Comma-separated tags describing the build, like "unsigned,debug". |
| 5167 | optional string tags = 9; |
| 5168 | } |
| 5169 | |
| 5170 | /** |
Adam He | 420947c | 2019-01-23 15:59:09 -0800 | [diff] [blame] | 5171 | * Logs information about mismatched caller for content capture. |
| 5172 | * |
| 5173 | * Logged from: |
| 5174 | * frameworks/base/core/java/android/service/contentcapture/ContentCaptureService.java |
| 5175 | */ |
| 5176 | message ContentCaptureCallerMismatchReported { |
| 5177 | optional string intended_package = 1; |
| 5178 | optional string calling_package = 2; |
| 5179 | } |
| 5180 | |
| 5181 | /** |
| 5182 | * Logs information about content capture service events. |
| 5183 | * |
| 5184 | * Logged from: |
| 5185 | * frameworks/base/services/contentcapture/java/com/android/server/contentcapture/ContentCaptureMetricsLogger.java |
| 5186 | */ |
| 5187 | message ContentCaptureServiceEvents { |
| 5188 | // The type of event. |
| 5189 | enum Event { |
| 5190 | UNKNOWN = 0; |
| 5191 | ON_CONNECTED = 1; |
| 5192 | ON_DISCONNECTED = 2; |
| 5193 | SET_WHITELIST = 3; |
| 5194 | SET_DISABLED = 4; |
| 5195 | ON_USER_DATA_REMOVED = 5; |
| 5196 | } |
| 5197 | optional Event event = 1; |
| 5198 | // component/package of content capture service. |
| 5199 | optional string service_info = 2; |
| 5200 | // component/package of target. |
| 5201 | // it's a concatenated list of component/package for SET_WHITELIST event |
| 5202 | // separated by " ". |
| 5203 | optional string target_info = 3; |
| 5204 | } |
| 5205 | |
| 5206 | /** |
| 5207 | * Logs information about content capture session events. |
| 5208 | * |
| 5209 | * Logged from: |
| 5210 | * frameworks/base/services/contentcapture/java/com/android/server/contentcapture/ContentCaptureMetricsLogger.java |
| 5211 | */ |
| 5212 | message ContentCaptureSessionEvents { |
| 5213 | // The type of event. |
| 5214 | enum Event { |
| 5215 | UNKNOWN = 0; |
| 5216 | ON_SESSION_STARTED = 1; |
| 5217 | ON_SESSION_FINISHED = 2; |
| 5218 | SESSION_NOT_CREATED = 3; |
| 5219 | } |
| 5220 | optional int32 session_id = 1; |
| 5221 | optional Event event = 2; |
| 5222 | // (n/a on session finished) |
| 5223 | optional int32 state_flags = 3; |
| 5224 | // component/package of content capture service. |
| 5225 | optional string service_info = 4; |
| 5226 | // component/package of app. |
| 5227 | // (n/a on session finished) |
| 5228 | optional string app_info = 5; |
| 5229 | optional bool is_child_session = 6; |
| 5230 | } |
| 5231 | |
| 5232 | /** |
| 5233 | * Logs information about session being flushed. |
| 5234 | * |
| 5235 | * Logged from: |
| 5236 | * frameworks/base/services/contentcapture/java/com/android/server/contentcapture/ContentCaptureMetricsLogger.java |
| 5237 | */ |
| 5238 | message ContentCaptureFlushed { |
| 5239 | optional int32 session_id = 1; |
| 5240 | // component/package of content capture service. |
| 5241 | optional string service_info = 2; |
| 5242 | // component/package of app. |
| 5243 | optional string app_info = 3; |
| 5244 | // session start/finish events |
| 5245 | optional int32 child_session_started = 4; |
| 5246 | optional int32 child_session_finished = 5; |
| 5247 | // count of view events. |
| 5248 | optional int32 view_appeared_count = 6; |
| 5249 | optional int32 view_disappeared_count = 7; |
| 5250 | optional int32 view_text_changed_count = 8; |
| 5251 | |
| 5252 | // Flush stats. |
| 5253 | optional int32 max_events = 9; |
| 5254 | optional int32 idle_flush_freq = 10; |
| 5255 | optional int32 text_flush_freq = 11; |
| 5256 | optional int32 flush_reason = 12; |
| 5257 | } |
| 5258 | |
| 5259 | /** |
Bookatz | 75ee6042 | 2018-11-09 12:27:37 -0800 | [diff] [blame] | 5260 | * Pulls on-device BatteryStats power use calculations for the overall device. |
| 5261 | */ |
| 5262 | message DeviceCalculatedPowerUse { |
Bookatz | 3dbc13a | 2018-12-21 12:16:51 -0800 | [diff] [blame] | 5263 | // Power used by the device in nAs (i.e. nanocoulombs (nC)), as computed by BatteryStats, since |
| 5264 | // BatteryStats last reset (i.e. roughly since device was last significantly charged). |
| 5265 | // Currently, this is from BatteryStatsHelper.getComputedPower() (not getTotalPower()). |
| 5266 | optional int64 computed_power_nano_amp_secs = 1; |
Bookatz | 75ee6042 | 2018-11-09 12:27:37 -0800 | [diff] [blame] | 5267 | } |
| 5268 | |
| 5269 | /** |
| 5270 | * Pulls on-device BatteryStats power use calculations broken down by uid. |
| 5271 | * This atom should be complemented by DeviceCalculatedPowerBlameOther, which contains the power use |
| 5272 | * that is attributed to non-uid items. They must all be included to get the total power use. |
| 5273 | */ |
| 5274 | message DeviceCalculatedPowerBlameUid { |
| 5275 | // Uid being blamed. Note: isolated uids have already been mapped to host uid. |
| 5276 | optional int32 uid = 1 [(is_uid) = true]; |
| 5277 | |
Bookatz | 3dbc13a | 2018-12-21 12:16:51 -0800 | [diff] [blame] | 5278 | // Power used by this uid in nAs (i.e. nanocoulombs (nC)), as computed by BatteryStats, since |
| 5279 | // BatteryStats last reset (i.e. roughly since device was last significantly charged). |
| 5280 | optional int64 power_nano_amp_secs = 2; |
Bookatz | 75ee6042 | 2018-11-09 12:27:37 -0800 | [diff] [blame] | 5281 | } |
| 5282 | |
| 5283 | /** |
| 5284 | * Pulls on-device BatteryStats power use calculations that are not due to a uid, broken down by |
| 5285 | * drain type. |
| 5286 | * This atom should be complemented by DeviceCalculatedPowerBlameUid, which contains the blame that |
| 5287 | * is attributed uids. They must all be included to get the total power use. |
| 5288 | */ |
| 5289 | message DeviceCalculatedPowerBlameOther { |
| 5290 | // The type of item whose power use is being reported. |
| 5291 | enum DrainType { |
| 5292 | AMBIENT_DISPLAY = 0; |
| 5293 | // reserved 1; reserved "APP"; // Logged instead in DeviceCalculatedPowerBlameUid. |
| 5294 | BLUETOOTH = 2; |
| 5295 | CAMERA = 3; |
| 5296 | // Cell-standby |
| 5297 | CELL = 4; |
| 5298 | FLASHLIGHT = 5; |
| 5299 | IDLE = 6; |
| 5300 | MEMORY = 7; |
| 5301 | // Amount that total computed drain exceeded the drain estimated using the |
| 5302 | // battery level changes and capacity. |
| 5303 | OVERCOUNTED = 8; |
| 5304 | PHONE = 9; |
| 5305 | SCREEN = 10; |
| 5306 | // Amount that total computed drain was below the drain estimated using the |
| 5307 | // battery level changes and capacity. |
| 5308 | UNACCOUNTED = 11; |
| 5309 | // reserved 12; reserved "USER"; // Entire drain for a user. This is NOT supported. |
| 5310 | WIFI = 13; |
| 5311 | } |
| 5312 | optional DrainType drain_type = 1; |
| 5313 | |
Bookatz | 3dbc13a | 2018-12-21 12:16:51 -0800 | [diff] [blame] | 5314 | // Power used by this item in nAs (i.e. nanocoulombs (nC)), as computed by BatteryStats, since |
| 5315 | // BatteryStats last reset (i.e. roughly since device was last significantly charged). |
| 5316 | optional int64 power_nano_amp_secs = 2; |
Rafal Slawik | 3bea895 | 2018-11-15 12:39:33 +0000 | [diff] [blame] | 5317 | } |
arangelov | 4e99406 | 2018-11-13 16:12:38 +0000 | [diff] [blame] | 5318 | |
| 5319 | /** |
| 5320 | * Logs device policy features. |
| 5321 | * |
| 5322 | * Logged from: |
| 5323 | * frameworks/base/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java |
| 5324 | * packages/apps/ManagedProvisioning/src/com/android/managedprovisioning/ |
| 5325 | */ |
| 5326 | message DevicePolicyEvent { |
| 5327 | // The event id - unique for each event. |
| 5328 | optional android.stats.devicepolicy.EventId event_id = 1; |
| 5329 | // The admin package name. |
| 5330 | optional string admin_package_name = 2; |
| 5331 | // A generic integer parameter. |
| 5332 | optional int32 integer_value = 3; |
| 5333 | // A generic boolean parameter. |
| 5334 | optional bool boolean_value = 4; |
| 5335 | // A parameter specifying a time period in milliseconds. |
| 5336 | optional uint64 time_period_millis = 5; |
| 5337 | // A parameter specifying a list of package names, bundle extras or string parameters. |
| 5338 | optional android.stats.devicepolicy.StringList string_list_value = 6 [(log_mode) = MODE_BYTES]; |
| 5339 | } |
shawnlin | ea5b66b | 2018-11-13 15:05:29 +0800 | [diff] [blame] | 5340 | |
| 5341 | /** |
| 5342 | * Logs when DocumentsUI is started, and how. Call this when DocumentsUI first starts up. |
| 5343 | * |
| 5344 | * Logged from: |
| 5345 | * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java |
| 5346 | */ |
| 5347 | message DocsUILaunchReported { |
| 5348 | optional android.stats.docsui.LaunchAction launch_action = 1; |
| 5349 | optional bool has_initial_uri = 2; |
| 5350 | optional android.stats.docsui.MimeType mime_type = 3; |
| 5351 | optional android.stats.docsui.Root initial_root = 4; |
| 5352 | } |
| 5353 | |
| 5354 | /** |
| 5355 | * Logs root/app visited event in file managers/picker. Call this when the user |
| 5356 | * taps on root/app in hamburger menu. |
| 5357 | * |
| 5358 | * Logged from: |
| 5359 | * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java |
| 5360 | */ |
| 5361 | message DocsUIRootVisitedReported { |
| 5362 | optional android.stats.docsui.ContextScope scope = 1; |
| 5363 | optional android.stats.docsui.Root root = 2; |
| 5364 | } |
| 5365 | |
| 5366 | /** |
| 5367 | * Logs file operation stats. Call this when a file operation has completed. |
| 5368 | * |
| 5369 | * Logged from: |
| 5370 | * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java |
| 5371 | */ |
| 5372 | message DocsUIFileOperationReported { |
| 5373 | optional android.stats.docsui.Provider provider = 1; |
| 5374 | optional android.stats.docsui.FileOperation file_op = 2; |
| 5375 | } |
| 5376 | |
| 5377 | /** |
| 5378 | * Logs file operation stats. Call this when a copy/move operation has completed with a specific |
| 5379 | * mode. |
| 5380 | * |
| 5381 | * Logged from: |
| 5382 | * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java |
| 5383 | */ |
| 5384 | message DocsUIFileOperationCopyMoveModeReported { |
| 5385 | optional android.stats.docsui.FileOperation file_op = 1; |
| 5386 | optional android.stats.docsui.CopyMoveOpMode mode = 2; |
| 5387 | } |
| 5388 | |
| 5389 | |
| 5390 | /** |
| 5391 | * Logs file sub operation stats. Call this when a file operation has failed. |
| 5392 | * |
| 5393 | * Logged from: |
| 5394 | * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java |
| 5395 | */ |
| 5396 | message DocsUIFileOperationFailureReported { |
| 5397 | optional android.stats.docsui.Authority authority = 1; |
| 5398 | optional android.stats.docsui.SubFileOperation sub_op = 2; |
| 5399 | } |
| 5400 | |
| 5401 | /** |
| 5402 | * Logs the cancellation of a file operation. Call this when a job is canceled |
| 5403 | * |
| 5404 | * Logged from: |
| 5405 | * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java |
| 5406 | */ |
| 5407 | message DocsUIFileOperationCanceledReported { |
| 5408 | optional android.stats.docsui.FileOperation file_op = 1; |
| 5409 | } |
| 5410 | |
| 5411 | /** |
| 5412 | * Logs startup time in milliseconds. |
| 5413 | * |
| 5414 | * Logged from: |
| 5415 | * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java |
| 5416 | */ |
| 5417 | message DocsUIStartupMsReported { |
| 5418 | optional int32 startup_millis = 1; |
| 5419 | } |
| 5420 | |
| 5421 | /** |
| 5422 | * Logs the action that was started by user. |
| 5423 | * |
| 5424 | * Logged from: |
| 5425 | * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java |
| 5426 | */ |
| 5427 | message DocsUIUserActionReported { |
| 5428 | optional android.stats.docsui.UserAction action = 1; |
| 5429 | } |
| 5430 | |
| 5431 | /** |
| 5432 | * Logs the invalid type when invalid scoped access is requested. |
| 5433 | * |
| 5434 | * Logged from: |
| 5435 | * package/app/DocumentsUI/src/com/android/documentsui/ScopedAccessMetrics.java |
| 5436 | */ |
| 5437 | message DocsUIInvalidScopedAccessRequestReported { |
| 5438 | optional android.stats.docsui.InvalidScopedAccess type = 1; |
Rafal Slawik | da51b93 | 2018-12-13 16:31:33 +0000 | [diff] [blame] | 5439 | } |
Ben Murdoch | bab399f6 | 2018-12-06 11:01:38 +0000 | [diff] [blame] | 5440 | |
| 5441 | /** |
shawnlin | a75e82d | 2019-01-07 10:31:12 +0800 | [diff] [blame] | 5442 | * Logs the package name that launches docsui picker mode. |
| 5443 | * |
| 5444 | * Logged from: |
| 5445 | * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java |
| 5446 | */ |
| 5447 | message DocsUIPickerLaunchedFromReported { |
| 5448 | optional string package_name = 1; |
| 5449 | } |
| 5450 | |
| 5451 | /** |
| 5452 | * Logs the search type. |
| 5453 | * |
| 5454 | * Logged from: |
| 5455 | * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java |
| 5456 | */ |
| 5457 | message DocsUISearchTypeReported { |
| 5458 | optional android.stats.docsui.SearchType search_type = 1; |
| 5459 | } |
| 5460 | |
| 5461 | /** |
| 5462 | * Logs the search mode. |
| 5463 | * |
| 5464 | * Logged from: |
| 5465 | * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java |
| 5466 | */ |
| 5467 | message DocsUISearchModeReported { |
| 5468 | optional android.stats.docsui.SearchMode search_mode = 1; |
| 5469 | } |
| 5470 | |
| 5471 | /** |
| 5472 | * Logs the pick result information. |
| 5473 | * |
| 5474 | * Logged from: |
| 5475 | * package/app/DocumentsUI/src/com/android/documentsui/Metrics.java |
| 5476 | */ |
| 5477 | message DocsUIPickResultReported { |
| 5478 | optional int32 total_action_count = 1; |
| 5479 | optional int64 duration_millis = 2; |
| 5480 | optional int32 file_count= 3; |
| 5481 | optional bool is_searching = 4; |
| 5482 | optional android.stats.docsui.Root picked_from = 5; |
| 5483 | optional android.stats.docsui.MimeType mime_type = 6; |
| 5484 | optional int32 repeatedly_pick_times = 7; |
| 5485 | } |
| 5486 | |
| 5487 | /** |
Ben Murdoch | bab399f6 | 2018-12-06 11:01:38 +0000 | [diff] [blame] | 5488 | * Logs when an app's memory is compacted. |
| 5489 | * |
| 5490 | * Logged from: |
| 5491 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
| 5492 | */ |
| 5493 | message AppCompacted { |
| 5494 | // The pid of the process being compacted. |
| 5495 | optional int32 pid = 1; |
| 5496 | |
| 5497 | // The name of the process being compacted. |
| 5498 | optional string process_name = 2; |
| 5499 | |
| 5500 | // The type of compaction. |
| 5501 | enum Action { |
| 5502 | UNKNOWN = 0; |
| 5503 | SOME = 1; |
| 5504 | FULL = 2; |
Ben Murdoch | 35c1420 | 2019-04-09 11:00:53 +0100 | [diff] [blame] | 5505 | PERSISTENT = 3; |
| 5506 | BFGS = 4; |
Ben Murdoch | bab399f6 | 2018-12-06 11:01:38 +0000 | [diff] [blame] | 5507 | } |
Ben Murdoch | 01720b8 | 2018-12-19 18:03:44 +0000 | [diff] [blame] | 5508 | optional Action action = 3; |
Ben Murdoch | bab399f6 | 2018-12-06 11:01:38 +0000 | [diff] [blame] | 5509 | |
| 5510 | // Total RSS in kilobytes consumed by the process prior to compaction. |
| 5511 | optional int64 before_rss_total_kilobytes = 4; |
| 5512 | |
| 5513 | // File RSS in kilobytes consumed by the process prior to compaction. |
| 5514 | optional int64 before_rss_file_kilobytes = 5; |
| 5515 | |
| 5516 | // Anonymous RSS in kilobytes consumed by the process prior to compaction. |
| 5517 | optional int64 before_rss_anon_kilobytes = 6; |
| 5518 | |
| 5519 | // Swap in kilobytes consumed by the process prior to compaction. |
| 5520 | optional int64 before_swap_kilobytes = 7; |
| 5521 | |
| 5522 | // Total RSS in kilobytes consumed by the process after compaction. |
| 5523 | optional int64 after_rss_total_kilobytes = 8; |
| 5524 | |
| 5525 | // File RSS in kilobytes consumed by the process after compaction. |
| 5526 | optional int64 after_rss_file_kilobytes = 9; |
| 5527 | |
| 5528 | // Anonymous RSS in kilobytes consumed by the process after compaction. |
| 5529 | optional int64 after_rss_anon_kilobytes = 10; |
| 5530 | |
| 5531 | // Swap in kilobytes consumed by the process after compaction. |
| 5532 | optional int64 after_swap_kilobytes = 11; |
| 5533 | |
| 5534 | // The time taken to perform compaction in milliseconds. |
| 5535 | optional int64 time_to_compact_millis = 12; |
| 5536 | |
| 5537 | // The last compaction action performed for this app. |
| 5538 | optional Action last_action = 13; |
| 5539 | |
Ben Murdoch | 01720b8 | 2018-12-19 18:03:44 +0000 | [diff] [blame] | 5540 | // The last time that compaction was attempted on this process in milliseconds |
| 5541 | // since boot, not including sleep (see SystemClock.uptimeMillis()). |
| 5542 | optional int64 last_compact_timestamp_ms_since_boot = 14; |
Ben Murdoch | bab399f6 | 2018-12-06 11:01:38 +0000 | [diff] [blame] | 5543 | |
Ben Murdoch | 885c21b | 2019-03-15 18:02:04 +0000 | [diff] [blame] | 5544 | // 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] | 5545 | optional int32 oom_score_adj = 15; |
Ben Murdoch | bab399f6 | 2018-12-06 11:01:38 +0000 | [diff] [blame] | 5546 | |
| 5547 | // The process state at the time of compaction. |
| 5548 | optional android.app.ProcessStateEnum process_state = 16 [default = PROCESS_STATE_UNKNOWN]; |
Ben Murdoch | fdc5593 | 2019-01-30 10:43:15 +0000 | [diff] [blame] | 5549 | |
| 5550 | // Free ZRAM in kilobytes before compaction. |
| 5551 | optional int64 before_zram_free_kilobytes = 17; |
| 5552 | |
| 5553 | // Free ZRAM in kilobytes after compaction. |
| 5554 | optional int64 after_zram_free_kilobytes = 18; |
Ben Murdoch | bab399f6 | 2018-12-06 11:01:38 +0000 | [diff] [blame] | 5555 | } |
lifr | 157fc55 | 2018-12-12 16:38:04 +0800 | [diff] [blame] | 5556 | |
| 5557 | /** |
lifr | b6b90b6 | 2019-03-29 00:40:17 +0800 | [diff] [blame] | 5558 | * Logs a DNS lookup operation initiated by the system resolver on behalf of an application |
| 5559 | * invoking native APIs such as getaddrinfo() or Java APIs such as Network#getAllByName(). |
| 5560 | * |
lifr | 1f74b05 | 2019-04-16 22:16:30 +0800 | [diff] [blame] | 5561 | * The NetworkDnsEventReported message represents the entire lookup operation, which may |
| 5562 | * result one or more queries to the recursive DNS resolvers. Those are individually logged |
| 5563 | * in DnsQueryEvents to enable computing error rates and network latency and timeouts |
| 5564 | * broken up by query type, transport, network interface, etc. |
lifr | 157fc55 | 2018-12-12 16:38:04 +0800 | [diff] [blame] | 5565 | */ |
| 5566 | message NetworkDnsEventReported { |
lifr | 1f74b05 | 2019-04-16 22:16:30 +0800 | [diff] [blame] | 5567 | optional android.stats.dnsresolver.EventType event_type = 1; |
lifr | 157fc55 | 2018-12-12 16:38:04 +0800 | [diff] [blame] | 5568 | |
lifr | 1f74b05 | 2019-04-16 22:16:30 +0800 | [diff] [blame] | 5569 | optional android.stats.dnsresolver.ReturnCode return_code = 2; |
lifr | b6b90b6 | 2019-03-29 00:40:17 +0800 | [diff] [blame] | 5570 | |
| 5571 | // The latency in microseconds of the entire DNS lookup operation. |
lifr | 157fc55 | 2018-12-12 16:38:04 +0800 | [diff] [blame] | 5572 | optional int32 latency_micros = 3; |
lifr | b6b90b6 | 2019-03-29 00:40:17 +0800 | [diff] [blame] | 5573 | |
lifr | 1f74b05 | 2019-04-16 22:16:30 +0800 | [diff] [blame] | 5574 | // Only valid for event_type = EVENT_GETADDRINFO. |
| 5575 | optional int32 hints_ai_flags = 4; |
lifr | b6b90b6 | 2019-03-29 00:40:17 +0800 | [diff] [blame] | 5576 | |
lifr | 1f74b05 | 2019-04-16 22:16:30 +0800 | [diff] [blame] | 5577 | // Flags passed to android_res_nsend() defined in multinetwork.h |
| 5578 | // Only valid for event_type = EVENT_RESNSEND. |
| 5579 | optional int32 res_nsend_flags = 5; |
lifr | b6b90b6 | 2019-03-29 00:40:17 +0800 | [diff] [blame] | 5580 | |
lifr | ad9becc | 2019-05-20 11:04:41 +0800 | [diff] [blame] | 5581 | optional android.stats.dnsresolver.NetworkType network_type = 6; |
lifr | b6b90b6 | 2019-03-29 00:40:17 +0800 | [diff] [blame] | 5582 | |
| 5583 | // The DNS over TLS mode on a specific netId. |
lifr | 1f74b05 | 2019-04-16 22:16:30 +0800 | [diff] [blame] | 5584 | optional android.stats.dnsresolver.PrivateDnsModes private_dns_modes = 7; |
lifr | b6b90b6 | 2019-03-29 00:40:17 +0800 | [diff] [blame] | 5585 | |
| 5586 | // Additional pass-through fields opaque to statsd. |
| 5587 | // 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] | 5588 | optional android.stats.dnsresolver.DnsQueryEvents dns_query_events = 8 [(log_mode) = MODE_BYTES]; |
lifr | 2b9fab7 | 2019-07-20 15:28:28 +0800 | [diff] [blame] | 5589 | |
| 5590 | // The sample rate of DNS stats (to statsd) is 1/sampling_rate_denom. |
| 5591 | optional int32 sampling_rate_denom = 9; |
lifr | 157fc55 | 2018-12-12 16:38:04 +0800 | [diff] [blame] | 5592 | } |
Chiachang Wang | f6bedc2 | 2019-01-14 11:54:32 +0800 | [diff] [blame] | 5593 | |
| 5594 | /** |
| 5595 | * Logs when a data stall event occurs. |
| 5596 | * |
| 5597 | * Log from: |
| 5598 | * frameworks/base/services/core/java/com/android/server/connectivity/NetworkMonitor.java |
| 5599 | */ |
| 5600 | message DataStallEvent { |
| 5601 | // Data stall evaluation type. |
| 5602 | // See frameworks/base/services/core/java/com/android/server/connectivity/NetworkMonitor.java |
| 5603 | // Refer to the definition of DATA_STALL_EVALUATION_TYPE_*. |
| 5604 | optional int32 evaluation_type = 1; |
| 5605 | // See definition in data_stall_event.proto. |
| 5606 | optional com.android.server.connectivity.ProbeResult validation_result = 2; |
| 5607 | // See definition in data_stall_event.proto. |
| 5608 | optional android.net.NetworkCapabilitiesProto.Transport network_type = 3; |
| 5609 | // See definition in data_stall_event.proto. |
| 5610 | optional com.android.server.connectivity.WifiData wifi_info = 4 [(log_mode) = MODE_BYTES]; |
| 5611 | // See definition in data_stall_event.proto. |
| 5612 | optional com.android.server.connectivity.CellularData cell_info = 5 [(log_mode) = MODE_BYTES]; |
| 5613 | // See definition in data_stall_event.proto. |
| 5614 | optional com.android.server.connectivity.DnsEvent dns_event = 6 [(log_mode) = MODE_BYTES]; |
| 5615 | } |
Christian Brunschen | f86039e | 2018-12-21 12:26:14 +0000 | [diff] [blame] | 5616 | |
| 5617 | /* |
| 5618 | * Logs when RescueParty resets some set of experiment flags. |
| 5619 | * |
| 5620 | * Logged from: |
| 5621 | * frameworks/base/services/core/java/com/android/server/RescueParty.java |
| 5622 | */ |
| 5623 | message RescuePartyResetReported { |
| 5624 | // The rescue level of this reset. A value of 0 indicates missing or unknown level information. |
| 5625 | optional int32 rescue_level = 1; |
| 5626 | } |
Mathew Inwood | b375be5 | 2019-01-04 11:36:25 +0000 | [diff] [blame] | 5627 | |
| 5628 | /** |
| 5629 | * Logs when signed config is received from an APK, and if that config was applied successfully. |
| 5630 | * Logged from: |
| 5631 | * frameworks/base/services/core/java/com/android/server/signedconfig/SignedConfigService.java |
| 5632 | */ |
| 5633 | message SignedConfigReported { |
| 5634 | enum Type { |
| 5635 | UNKNOWN_TYPE = 0; |
| 5636 | GLOBAL_SETTINGS = 1; |
| 5637 | } |
| 5638 | optional Type type = 1; |
| 5639 | |
| 5640 | // The final status of the signed config received. |
| 5641 | enum Status { |
| 5642 | UNKNOWN_STATUS = 0; |
| 5643 | APPLIED = 1; |
| 5644 | BASE64_FAILURE_CONFIG = 2; |
| 5645 | BASE64_FAILURE_SIGNATURE = 3; |
| 5646 | SECURITY_EXCEPTION = 4; |
| 5647 | INVALID_CONFIG = 5; |
| 5648 | OLD_CONFIG = 6; |
| 5649 | SIGNATURE_CHECK_FAILED = 7; |
| 5650 | NOT_APPLICABLE = 8; |
Mathew Inwood | 610d096 | 2019-01-15 11:50:28 +0000 | [diff] [blame] | 5651 | SIGNATURE_CHECK_FAILED_PROD_KEY_ABSENT = 9; |
Mathew Inwood | b375be5 | 2019-01-04 11:36:25 +0000 | [diff] [blame] | 5652 | } |
| 5653 | optional Status status = 2; |
| 5654 | |
| 5655 | // The version of the signed config processed. |
| 5656 | optional int32 version = 3; |
| 5657 | |
| 5658 | // The package name that the config was extracted from. |
| 5659 | optional string from_package = 4; |
| 5660 | |
| 5661 | enum Key { |
| 5662 | NO_KEY = 0; |
| 5663 | DEBUG = 1; |
| 5664 | PRODUCTION = 2; |
| 5665 | } |
| 5666 | // Which key was used to verify the config. |
| 5667 | optional Key verified_with = 5; |
| 5668 | } |
Yu-Han Yang | 8a1b51d | 2018-12-26 22:18:31 -0800 | [diff] [blame] | 5669 | |
| 5670 | /* |
| 5671 | * Logs GNSS Network-Initiated (NI) location events. |
| 5672 | * |
| 5673 | * Logged from: |
| 5674 | * frameworks/base/services/core/java/com/android/server/location/GnssLocationProvider.java |
| 5675 | */ |
| 5676 | message GnssNiEventReported { |
| 5677 | // The type of GnssNiEvent. |
| 5678 | enum EventType { |
| 5679 | UNKNOWN = 0; |
| 5680 | NI_REQUEST = 1; |
| 5681 | NI_RESPONSE = 2; |
| 5682 | } |
| 5683 | optional EventType event_type = 1; |
| 5684 | |
| 5685 | // An ID generated by HAL to associate NI notifications and UI responses. |
| 5686 | optional int32 notification_id = 2; |
| 5687 | |
| 5688 | // 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] | 5689 | optional android.server.location.GnssNiType ni_type = 3; |
Yu-Han Yang | 8a1b51d | 2018-12-26 22:18:31 -0800 | [diff] [blame] | 5690 | |
| 5691 | // NI requires notification. |
| 5692 | optional bool need_notify = 4; |
| 5693 | |
| 5694 | // NI requires verification. |
| 5695 | optional bool need_verify = 5; |
| 5696 | |
| 5697 | // NI requires privacy override, no notification/minimal trace. |
| 5698 | optional bool privacy_override = 6; |
| 5699 | |
| 5700 | // Timeout period to wait for user response. Set to 0 for no timeout limit. Specified in |
| 5701 | // seconds. |
| 5702 | optional int32 timeout = 7; |
| 5703 | |
| 5704 | // Default response when timeout. |
Yu-Han Yang | 14d5fb4 | 2019-01-16 12:42:59 -0800 | [diff] [blame] | 5705 | optional android.server.location.GnssUserResponseType default_response = 8; |
Yu-Han Yang | 8a1b51d | 2018-12-26 22:18:31 -0800 | [diff] [blame] | 5706 | |
| 5707 | // String representing the requester of the network inititated location request. |
| 5708 | optional string requestor_id = 9; |
| 5709 | |
| 5710 | // Notification message text string representing the service(for eg. SUPL-service) who sent the |
| 5711 | // network initiated location request. |
| 5712 | optional string text = 10; |
| 5713 | |
| 5714 | // requestorId decoding scheme. |
Yu-Han Yang | 14d5fb4 | 2019-01-16 12:42:59 -0800 | [diff] [blame] | 5715 | optional android.server.location.GnssNiEncodingType requestor_id_encoding = 11; |
Yu-Han Yang | 8a1b51d | 2018-12-26 22:18:31 -0800 | [diff] [blame] | 5716 | |
| 5717 | // Notification message text decoding scheme. |
Yu-Han Yang | 14d5fb4 | 2019-01-16 12:42:59 -0800 | [diff] [blame] | 5718 | optional android.server.location.GnssNiEncodingType text_encoding = 12; |
Yu-Han Yang | 8a1b51d | 2018-12-26 22:18:31 -0800 | [diff] [blame] | 5719 | |
| 5720 | // True if SUPL ES is enabled. |
| 5721 | optional bool is_supl_es_enabled = 13; |
| 5722 | |
| 5723 | // True if GNSS location is enabled. |
| 5724 | optional bool is_location_enabled = 14; |
| 5725 | |
| 5726 | // GNSS NI responses which define the response in NI structures. |
Yu-Han Yang | 14d5fb4 | 2019-01-16 12:42:59 -0800 | [diff] [blame] | 5727 | optional android.server.location.GnssUserResponseType user_response = 15; |
| 5728 | } |
| 5729 | |
| 5730 | /** |
| 5731 | * Logs GNSS non-framework (NFW) location notification. |
| 5732 | * |
| 5733 | * Logged from: |
| 5734 | * frameworks/base/services/core/java/com/android/server/location/GnssLocationProvider.java |
| 5735 | */ |
| 5736 | message GnssNfwNotificationReported { |
| 5737 | // Package name of the Android proxy application representing the non-framework entity that |
| 5738 | // requested location. Set to empty string if unknown. |
| 5739 | optional string proxy_app_package_name = 1; |
| 5740 | |
| 5741 | // Protocol stack that initiated the non-framework location request. |
| 5742 | optional android.server.location.NfwProtocolStack protocol_stack = 2; |
| 5743 | |
| 5744 | // Name of the protocol stack if protocol_stack field is set to OTHER_PROTOCOL_STACK. Otherwise, |
| 5745 | // set to empty string. This field is opaque to the framework and used for logging purposes. |
| 5746 | optional string other_protocol_stack_name = 3; |
| 5747 | |
| 5748 | // Source initiating/receiving the location information. |
| 5749 | optional android.server.location.NfwRequestor requestor = 4; |
| 5750 | |
| 5751 | // Identity of the endpoint receiving the location information. For example, carrier name, OEM |
| 5752 | // name, SUPL SLP/E-SLP FQDN, chipset vendor name, etc. This field is opaque to the framework |
| 5753 | // and used for logging purposes. |
| 5754 | optional string requestor_id = 5; |
| 5755 | |
| 5756 | // Indicates whether location information was provided for this request. |
| 5757 | optional android.server.location.NfwResponseType response_type = 6; |
| 5758 | |
| 5759 | // True if the device is in user initiated emergency session. |
| 5760 | optional bool in_emergency_mode = 7; |
| 5761 | |
| 5762 | // True if cached location is provided. |
| 5763 | optional bool is_cached_location = 8; |
| 5764 | |
| 5765 | // True if proxy app permission mismatch between framework and GNSS HAL. |
| 5766 | optional bool is_permission_mismatched = 9; |
| 5767 | } |
| 5768 | |
| 5769 | /** |
| 5770 | * Logs GNSS configuration as defined in IGnssConfiguration.hal. |
| 5771 | * |
| 5772 | * Logged from: |
| 5773 | * frameworks/base/services/core/java/com/android/server/location/GnssConfiguration.java |
| 5774 | */ |
| 5775 | message GnssConfigurationReported { |
| 5776 | // SUPL host name. |
| 5777 | optional string supl_host = 1; |
| 5778 | |
| 5779 | // SUPL port number. |
| 5780 | optional int32 supl_port = 2; |
| 5781 | |
| 5782 | // C2K host name. |
| 5783 | optional string c2k_host = 3; |
| 5784 | |
| 5785 | // C2K port number. |
| 5786 | optional int32 c2k_port = 4; |
| 5787 | |
| 5788 | // The SUPL version requested by Carrier. |
| 5789 | optional int32 supl_ver = 5; |
| 5790 | |
| 5791 | // The SUPL mode. |
| 5792 | optional android.server.location.SuplMode supl_mode = 6; |
| 5793 | |
| 5794 | // True if NI emergency SUPL restrictions is enabled. |
| 5795 | optional bool supl_es = 7; |
| 5796 | |
| 5797 | // LTE Positioning Profile settings |
| 5798 | optional android.server.location.LppProfile lpp_profile = 8; |
| 5799 | |
| 5800 | // Positioning protocol on A-Glonass system. |
| 5801 | optional android.server.location.GlonassPosProtocol a_glonass_pos_protocol_select = 9; |
| 5802 | |
| 5803 | // True if emergency PDN is used. Otherwise, regular PDN is used. |
| 5804 | optional bool use_emergency_pdn_for_emergency_supl= 10; |
| 5805 | |
| 5806 | // Configurations of how GPS functionalities should be locked when user turns off GPS On setting. |
| 5807 | optional android.server.location.GpsLock gps_lock = 11; |
| 5808 | |
| 5809 | // Number of seconds to extend the emergency session duration post emergency call. |
| 5810 | optional int32 es_extension_sec = 12; |
| 5811 | |
| 5812 | // The full list of package names of proxy Android applications representing the non-framework |
| 5813 | // location access entities (on/off the device) for which the framework user has granted |
| 5814 | // non-framework location access permission. The package names are concatenated in one string |
| 5815 | // with spaces as separators. |
| 5816 | optional string enabled_proxy_app_package_name_list = 13; |
Yu-Han Yang | 8a1b51d | 2018-12-26 22:18:31 -0800 | [diff] [blame] | 5817 | } |
Jack Yu | 95b64f3 | 2018-12-13 18:26:11 +0800 | [diff] [blame] | 5818 | |
| 5819 | /** |
| 5820 | * Logs when a NFC device's error occurred. |
| 5821 | * Logged from: |
| 5822 | * system/nfc/src/nfc/nfc/nfc_ncif.cc |
| 5823 | * packages/apps/Nfc/src/com/android/nfc/cardemulation/AidRoutingManager.java |
| 5824 | */ |
| 5825 | message NfcErrorOccurred { |
Alex Salo | d7c3eef | 2019-01-25 14:43:27 -0800 | [diff] [blame] | 5826 | enum Type { |
| 5827 | UNKNOWN = 0; |
| 5828 | CMD_TIMEOUT = 1; |
| 5829 | ERROR_NOTIFICATION = 2; |
| 5830 | AID_OVERFLOW = 3; |
| 5831 | } |
| 5832 | optional Type type = 1; |
| 5833 | // If it's nci cmd timeout, log the timeout command. |
| 5834 | optional uint32 nci_cmd = 2; |
Jack Yu | 95b64f3 | 2018-12-13 18:26:11 +0800 | [diff] [blame] | 5835 | |
Alex Salo | d7c3eef | 2019-01-25 14:43:27 -0800 | [diff] [blame] | 5836 | optional uint32 error_ntf_status_code = 3; |
Jack Yu | 95b64f3 | 2018-12-13 18:26:11 +0800 | [diff] [blame] | 5837 | } |
| 5838 | |
| 5839 | /** |
| 5840 | * Logs when a NFC device's state changed event |
| 5841 | * Logged from: |
| 5842 | * packages/apps/Nfc/src/com/android/nfc/NfcService.java |
| 5843 | */ |
| 5844 | message NfcStateChanged { |
Alex Salo | d7c3eef | 2019-01-25 14:43:27 -0800 | [diff] [blame] | 5845 | enum State { |
| 5846 | UNKNOWN = 0; |
| 5847 | OFF = 1; |
| 5848 | ON = 2; |
| 5849 | ON_LOCKED = 3; // Secure Nfc enabled. |
| 5850 | CRASH_RESTART = 4; // NfcService watchdog timeout restart. |
| 5851 | } |
| 5852 | optional State state = 1; |
Jack Yu | 95b64f3 | 2018-12-13 18:26:11 +0800 | [diff] [blame] | 5853 | } |
| 5854 | |
| 5855 | /** |
| 5856 | * Logs when a NFC Beam Transaction occurred. |
| 5857 | * Logged from: |
| 5858 | * packages/apps/Nfc/src/com/android/nfc/P2pLinkManager.java |
| 5859 | */ |
| 5860 | message NfcBeamOccurred { |
Alex Salo | d7c3eef | 2019-01-25 14:43:27 -0800 | [diff] [blame] | 5861 | enum Operation { |
| 5862 | UNKNOWN = 0; |
| 5863 | SEND = 1; |
| 5864 | RECEIVE = 2; |
| 5865 | } |
| 5866 | optional Operation operation = 1; |
Jack Yu | 95b64f3 | 2018-12-13 18:26:11 +0800 | [diff] [blame] | 5867 | } |
| 5868 | |
| 5869 | /** |
| 5870 | * Logs when a NFC Card Emulation Transaction occurred. |
| 5871 | * Logged from: |
| 5872 | * packages/apps/Nfc/src/com/android/nfc/cardemulation/HostEmulationManager.java |
| 5873 | * packages/apps/Nfc/src/com/android/nfc/cardemulation/HostNfcFEmulationManager.java |
| 5874 | */ |
| 5875 | message NfcCardemulationOccurred { |
Alex Salo | d7c3eef | 2019-01-25 14:43:27 -0800 | [diff] [blame] | 5876 | enum Category { |
| 5877 | UNKNOWN = 0; |
| 5878 | HCE_PAYMENT = 1; |
| 5879 | HCE_OTHER = 2; |
| 5880 | OFFHOST = 3; |
| 5881 | } |
| 5882 | // Transaction belongs to HCE payment or HCE other category, or offhost. |
| 5883 | optional Category category = 1; |
| 5884 | // SeName from transaction: SIMx, eSEx, HCE, HCEF. |
| 5885 | optional string se_name = 2; |
Jack Yu | 95b64f3 | 2018-12-13 18:26:11 +0800 | [diff] [blame] | 5886 | } |
| 5887 | |
| 5888 | /** |
| 5889 | * Logs when a NFC Tag event occurred. |
| 5890 | * Logged from: |
| 5891 | * packages/apps/Nfc/src/com/android/nfc/NfcDispatcher.java |
| 5892 | */ |
| 5893 | message NfcTagOccurred { |
Alex Salo | d7c3eef | 2019-01-25 14:43:27 -0800 | [diff] [blame] | 5894 | enum Type { |
| 5895 | UNKNOWN = 0; |
| 5896 | URL = 1; |
| 5897 | BT_PAIRING = 2; |
| 5898 | PROVISION = 3; |
| 5899 | WIFI_CONNECT = 4; |
| 5900 | APP_LAUNCH = 5; |
| 5901 | OTHERS = 6; |
| 5902 | } |
| 5903 | optional Type type = 1; |
Jack Yu | 95b64f3 | 2018-12-13 18:26:11 +0800 | [diff] [blame] | 5904 | } |
| 5905 | |
| 5906 | /** |
| 5907 | * Logs when Hce transaction triggered |
| 5908 | * Logged from: |
| 5909 | * system/nfc/src/nfc/nfc/nfc_ncif.cc |
| 5910 | */ |
| 5911 | message NfcHceTransactionOccurred { |
| 5912 | // The latency period(in microseconds) it took for the first HCE data |
| 5913 | // exchange. |
| 5914 | optional uint32 latency_micros = 1; |
| 5915 | } |
| 5916 | |
| 5917 | /** |
| 5918 | * Logs when SecureElement state event changed |
| 5919 | * Logged from: |
| 5920 | * packages/apps/SecureElement/src/com/android/se/Terminal.java |
| 5921 | */ |
| 5922 | message SeStateChanged { |
Alex Salo | d7c3eef | 2019-01-25 14:43:27 -0800 | [diff] [blame] | 5923 | enum State { |
| 5924 | UNKNOWN = 0; |
| 5925 | INITIALIZED = 1; |
| 5926 | DISCONNECTED = 2; |
| 5927 | CONNECTED = 3; |
| 5928 | HALCRASH = 4; |
| 5929 | } |
| 5930 | optional State state = 1; |
Jack Yu | 95b64f3 | 2018-12-13 18:26:11 +0800 | [diff] [blame] | 5931 | |
Alex Salo | d7c3eef | 2019-01-25 14:43:27 -0800 | [diff] [blame] | 5932 | optional string state_change_reason = 2; |
| 5933 | // SIMx or eSEx. |
| 5934 | optional string terminal = 3; |
Jack Yu | 95b64f3 | 2018-12-13 18:26:11 +0800 | [diff] [blame] | 5935 | } |
| 5936 | |
| 5937 | /** |
Philip P. Moltmann | e0cf4e6 | 2019-01-29 14:22:48 -0800 | [diff] [blame] | 5938 | * Information about a permission grant request |
| 5939 | */ |
| 5940 | message PermissionGrantRequestResultReported { |
| 5941 | // unique value identifying an API call. A API call might result in multiple of these atoms |
| 5942 | optional int64 request_id = 1; |
| 5943 | |
| 5944 | // UID of package requesting the permission grant |
Stanislav Zholnin | e8d073b | 2019-11-25 17:49:21 +0000 | [diff] [blame] | 5945 | optional int32 uid = 2 [(is_uid) = true]; |
Philip P. Moltmann | e0cf4e6 | 2019-01-29 14:22:48 -0800 | [diff] [blame] | 5946 | |
| 5947 | // Name of package requesting the permission grant |
Stanislav Zholnin | e8d073b | 2019-11-25 17:49:21 +0000 | [diff] [blame] | 5948 | optional string package_name = 3; |
Philip P. Moltmann | e0cf4e6 | 2019-01-29 14:22:48 -0800 | [diff] [blame] | 5949 | |
| 5950 | // The permission to be granted |
| 5951 | optional string permission_name = 4; |
| 5952 | |
| 5953 | // If the permission was explicitly requested via the API or added by the system |
| 5954 | optional bool is_implicit = 5; |
| 5955 | |
| 5956 | enum Result { |
| 5957 | UNDEFINED = 0; |
| 5958 | // permission request was ignored |
| 5959 | IGNORED = 1; |
| 5960 | // permission request was ignored because it was user fixed |
| 5961 | IGNORED_USER_FIXED = 2; |
| 5962 | // permission request was ignored because it was policy fixed |
| 5963 | IGNORED_POLICY_FIXED = 3; |
| 5964 | // permission was granted by user action |
| 5965 | USER_GRANTED = 4; |
| 5966 | // permission was automatically granted |
| 5967 | AUTO_GRANTED = 5; |
| 5968 | // permission was denied by user action |
| 5969 | USER_DENIED = 6; |
| 5970 | // permission was denied with prejudice by the user |
| 5971 | USER_DENIED_WITH_PREJUDICE = 7; |
| 5972 | // permission was automatically denied |
| 5973 | AUTO_DENIED = 8; |
Svet Ganov | d8eb8b2 | 2019-04-05 18:52:08 -0700 | [diff] [blame] | 5974 | // permission request was ignored because permission is restricted |
| 5975 | IGNORED_RESTRICTED_PERMISSION = 9; |
Stanislav Zholnin | 066aefb | 2019-10-17 18:40:33 +0100 | [diff] [blame] | 5976 | // one time permission was granted by user action |
| 5977 | USER_GRANTED_ONE_TIME = 10; |
Stanislav Zholnin | 8fde4fb | 2019-12-06 19:06:08 +0000 | [diff] [blame] | 5978 | // user ignored request by leaving the request screen without choosing any option |
| 5979 | USER_IGNORED = 11; |
Evan Severson | 7c1cc8a | 2019-12-17 14:36:17 -0800 | [diff] [blame] | 5980 | // user granted the permission after being linked to settings |
| 5981 | USER_GRANTED_IN_SETTINGS = 12; |
| 5982 | // user denied the permission after being linked to settings |
| 5983 | USER_DENIED_IN_SETTINGS = 13; |
| 5984 | // user denied the permission with prejudice after being linked to settings |
| 5985 | USER_DENIED_WITH_PREJUDICE_IN_SETTINGS = 14; |
| 5986 | // permission was automatically revoked after one-time permission expired |
| 5987 | AUTO_ONE_TIME_PERMISSION_REVOKED = 15; |
Philip P. Moltmann | e0cf4e6 | 2019-01-29 14:22:48 -0800 | [diff] [blame] | 5988 | } |
| 5989 | // The result of the permission grant |
| 5990 | optional Result result = 6; |
| 5991 | } |
| 5992 | |
| 5993 | /** |
Jack Yu | 95b64f3 | 2018-12-13 18:26:11 +0800 | [diff] [blame] | 5994 | * Logs when Omapi API used |
| 5995 | * Logged from: |
| 5996 | * packages/apps/SecureElement/src/com/android/se/Terminal.java |
| 5997 | */ |
| 5998 | message SeOmapiReported { |
Alex Salo | d7c3eef | 2019-01-25 14:43:27 -0800 | [diff] [blame] | 5999 | enum Operation { |
| 6000 | UNKNOWN = 0; |
| 6001 | OPEN_CHANNEL = 1; |
| 6002 | } |
| 6003 | optional Operation operation = 1; |
| 6004 | // SIMx or eSEx. |
| 6005 | optional string terminal = 2; |
Jack Yu | 95b64f3 | 2018-12-13 18:26:11 +0800 | [diff] [blame] | 6006 | |
Alex Salo | d7c3eef | 2019-01-25 14:43:27 -0800 | [diff] [blame] | 6007 | optional string package_name = 3; |
Jack Yu | 95b64f3 | 2018-12-13 18:26:11 +0800 | [diff] [blame] | 6008 | } |
Ng Zhi An | 7ff7fdb | 2019-01-16 15:35:51 -0800 | [diff] [blame] | 6009 | |
| 6010 | /** |
Alex Salo | a060aee | 2019-01-21 14:36:41 -0800 | [diff] [blame] | 6011 | * Logs the dispatch latency of a broadcast during processing of BOOT_COMPLETED. |
| 6012 | * The dispatch latency is the dispatchClockTime - enqueueClockTime. |
Ng Zhi An | 7ff7fdb | 2019-01-16 15:35:51 -0800 | [diff] [blame] | 6013 | * Logged from: |
| 6014 | * frameworks/base/services/core/java/com/android/server/am/BroadcastQueue.java |
| 6015 | */ |
| 6016 | message BroadcastDispatchLatencyReported { |
Alex Salo | a060aee | 2019-01-21 14:36:41 -0800 | [diff] [blame] | 6017 | optional int64 dispatch_latency_millis = 1; |
| 6018 | } |
| 6019 | |
| 6020 | /** |
| 6021 | * Logs AttentionManagerService attention check result. |
| 6022 | * |
| 6023 | * Logged from: |
| 6024 | * frameworks/base/services/core/java/com/android/server/attention/AttentionManagerService.java |
| 6025 | */ |
| 6026 | message AttentionManagerServiceResultReported { |
| 6027 | // See core/java/android/service/attention/AttentionService.java |
| 6028 | enum AttentionCheckResult { |
| 6029 | UNKNOWN = 20; |
| 6030 | ATTENTION_SUCCESS_ABSENT = 0; |
| 6031 | ATTENTION_SUCCESS_PRESENT = 1; |
Alex Salo | dd028ba | 2019-04-17 13:33:49 -0700 | [diff] [blame] | 6032 | ATTENTION_FAILURE_UNKNOWN = 2; |
| 6033 | ATTENTION_FAILURE_CANCELLED = 3; |
| 6034 | ATTENTION_FAILURE_PREEMPTED = 4; |
| 6035 | ATTENTION_FAILURE_TIMED_OUT = 5; |
| 6036 | ATTENTION_FAILURE_CAMERA_PERMISSION_ABSENT = 6; |
Alex Salo | a060aee | 2019-01-21 14:36:41 -0800 | [diff] [blame] | 6037 | } |
| 6038 | optional AttentionCheckResult attention_check_result = 1 [default = UNKNOWN]; |
Ng Zhi An | 7ff7fdb | 2019-01-16 15:35:51 -0800 | [diff] [blame] | 6039 | } |
Michael Groover | 9e7b06e | 2018-12-28 19:55:51 -0800 | [diff] [blame] | 6040 | |
| 6041 | /** |
| 6042 | * Logs when an adb connection changes state. |
| 6043 | * |
| 6044 | * Logged from: |
| 6045 | * frameworks/base/services/core/java/com/android/server/adb/AdbDebuggingManager.java |
| 6046 | */ |
| 6047 | message AdbConnectionChanged { |
| 6048 | // The last time this system connected via adb, or 0 if the 'always allow' option was not |
| 6049 | // previously selected for this system. |
| 6050 | optional int64 last_connection_time_millis = 1; |
| 6051 | |
| 6052 | // The time in ms within which a subsequent connection from an 'always allow' system is allowed |
| 6053 | // to reconnect via adb without user interaction. |
| 6054 | optional int64 auth_window_millis = 2; |
| 6055 | |
| 6056 | // The state of the adb connection from frameworks/base/core/proto/android/debug/enums.proto. |
| 6057 | optional android.debug.AdbConnectionStateEnum state = 3; |
| 6058 | |
| 6059 | // True if the 'always allow' option was selected for this system. |
| 6060 | optional bool always_allow = 4; |
| 6061 | } |
Carter Hsu | b8fd1e9 | 2019-01-11 15:24:45 +0800 | [diff] [blame] | 6062 | |
| 6063 | /* |
| 6064 | * Logs the reported speech DSP status. |
| 6065 | * |
| 6066 | * Logged from: |
| 6067 | * Vendor audio implementation. |
| 6068 | */ |
| 6069 | message SpeechDspStatReported { |
| 6070 | // The total Speech DSP uptime in milliseconds. |
| 6071 | optional int32 total_uptime_millis = 1; |
| 6072 | // The total Speech DSP downtime in milliseconds. |
| 6073 | optional int32 total_downtime_millis = 2; |
| 6074 | optional int32 total_crash_count = 3; |
| 6075 | optional int32 total_recover_count = 4; |
| 6076 | } |
Badhri Jagan Sridharan | 129c729 | 2019-01-14 21:18:25 -0800 | [diff] [blame] | 6077 | |
| 6078 | /** |
| 6079 | * Logs USB connector contaminant status. |
| 6080 | * |
| 6081 | * Logged from: USB Service. |
| 6082 | */ |
| 6083 | message UsbContaminantReported { |
| 6084 | optional string id = 1; |
| 6085 | optional android.service.usb.ContaminantPresenceStatus status = 2; |
| 6086 | } |
Olivier Gaillard | 18d45220 | 2019-01-22 15:03:41 +0000 | [diff] [blame] | 6087 | |
| 6088 | /** |
| 6089 | * This atom is for debugging purpose. |
| 6090 | */ |
| 6091 | message DebugElapsedClock { |
| 6092 | // Monotically increasing value for each pull. |
| 6093 | optional int64 pull_count = 1; |
| 6094 | // Time from System.elapsedRealtime. |
| 6095 | optional int64 elapsed_clock_millis = 2; |
| 6096 | // Time from System.elapsedRealtime. |
| 6097 | optional int64 same_elapsed_clock_millis = 3; |
| 6098 | // Diff between current elapsed time and elapsed time from previous pull. |
| 6099 | optional int64 elapsed_clock_diff_millis = 4; |
| 6100 | |
| 6101 | enum Type { |
| 6102 | TYPE_UNKNOWN = 0; |
| 6103 | ALWAYS_PRESENT = 1; |
| 6104 | PRESENT_ON_ODD_PULLS = 2; |
| 6105 | } |
| 6106 | // Type of behavior for the pulled data. |
| 6107 | optional Type type = 5; |
| 6108 | } |
| 6109 | |
| 6110 | /** |
| 6111 | * This atom is for debugging purpose. |
| 6112 | */ |
| 6113 | message DebugFailingElapsedClock { |
| 6114 | // Monotically increasing value for each pull. |
| 6115 | optional int64 pull_count = 1; |
| 6116 | // Time from System.elapsedRealtime. |
| 6117 | optional int64 elapsed_clock_millis = 2; |
| 6118 | // Time from System.elapsedRealtime. |
| 6119 | optional int64 same_elapsed_clock_millis = 3; |
| 6120 | // Diff between current elapsed time and elapsed time from previous pull. |
| 6121 | optional int64 elapsed_clock_diff_millis = 4; |
| 6122 | } |
Steven Wu | acef6bb | 2019-01-23 14:21:17 -0500 | [diff] [blame] | 6123 | |
| 6124 | /** Logs System UI bubbles event changed. |
| 6125 | * |
| 6126 | * Logged from: |
| 6127 | * frameworks/base/packages/SystemUI/src/com/android/systemui/bubbles |
| 6128 | */ |
| 6129 | message BubbleUIChanged { |
| 6130 | |
| 6131 | // The app package that is posting the bubble. |
| 6132 | optional string package_name = 1; |
| 6133 | |
| 6134 | // The notification channel that is posting the bubble. |
| 6135 | optional string notification_channel = 2; |
| 6136 | |
| 6137 | // The notification id associated with the posted bubble. |
| 6138 | optional int32 notification_id = 3; |
| 6139 | |
| 6140 | // The position of the bubble within the bubble stack. |
| 6141 | optional int32 position = 4; |
| 6142 | |
| 6143 | // The total number of bubbles within the bubble stack. |
| 6144 | optional int32 total_number = 5; |
| 6145 | |
| 6146 | // User interactions with the bubble. |
| 6147 | enum Action { |
| 6148 | UNKNOWN = 0; |
| 6149 | POSTED = 1; |
| 6150 | UPDATED = 2; |
| 6151 | EXPANDED = 3; |
| 6152 | COLLAPSED = 4; |
| 6153 | DISMISSED = 5; |
| 6154 | STACK_DISMISSED = 6; |
| 6155 | STACK_MOVED = 7; |
| 6156 | HEADER_GO_TO_APP = 8; |
| 6157 | HEADER_GO_TO_SETTINGS = 9; |
| 6158 | PERMISSION_OPT_IN = 10; |
| 6159 | PERMISSION_OPT_OUT = 11; |
Steven Wu | a62cb6a | 2019-02-15 17:12:51 -0500 | [diff] [blame] | 6160 | PERMISSION_DIALOG_SHOWN = 12; |
Steven Wu | acef6bb | 2019-01-23 14:21:17 -0500 | [diff] [blame] | 6161 | SWIPE_LEFT = 13; |
| 6162 | SWIPE_RIGHT = 14; |
Steven Wu | a254dab | 2019-01-29 11:30:39 -0500 | [diff] [blame] | 6163 | STACK_EXPANDED = 15; |
Steven Wu | 1684f2d5 | 2019-04-11 14:10:42 -0400 | [diff] [blame] | 6164 | FLYOUT = 16; |
Steven Wu | acef6bb | 2019-01-23 14:21:17 -0500 | [diff] [blame] | 6165 | } |
| 6166 | optional Action action = 6; |
| 6167 | |
| 6168 | // Normalized screen position of the bubble stack. The range is between 0 and 1. |
| 6169 | optional float normalized_x_position = 7; |
| 6170 | optional float normalized_y_position = 8; |
Steven Wu | 45e38ae | 2019-03-25 16:16:59 -0400 | [diff] [blame] | 6171 | |
| 6172 | // Whether the bubble is unread. If it is unread, a dot is shown in the bubble stack icon. |
| 6173 | optional bool is_unread = 9; |
Steven Wu | 8ba8ca9 | 2019-04-11 10:47:42 -0400 | [diff] [blame] | 6174 | |
| 6175 | // Whether the bubble is an on-going one. |
| 6176 | optional bool is_ongoing = 10; |
| 6177 | |
| 6178 | // Whether the bubble is produced by an app running in foreground. |
Mady Mellor | daa0a66 | 2019-06-24 16:42:35 -0700 | [diff] [blame] | 6179 | // This is deprecated and the value should be ignored. |
| 6180 | optional bool is_foreground = 11 [deprecated = true]; |
Steven Wu | acef6bb | 2019-01-23 14:21:17 -0500 | [diff] [blame] | 6181 | } |
Kweku Adams | 8845d01 | 2018-12-11 20:06:45 -0800 | [diff] [blame] | 6182 | |
| 6183 | /** |
Steven Wu | 552f63f | 2019-02-05 13:41:36 -0500 | [diff] [blame] | 6184 | * Logs System UI bubbles developer errors. |
| 6185 | * |
| 6186 | * Logged from: |
| 6187 | * frameworks/base/packages/SystemUI/src/com/android/systemui/bubbles/BubbleController.java |
| 6188 | */ |
| 6189 | message BubbleDeveloperErrorReported { |
| 6190 | |
| 6191 | // The app package that is posting the bubble. |
| 6192 | optional string package_name = 1; |
| 6193 | |
| 6194 | // Bubble developer error type enums. |
| 6195 | enum Error { |
| 6196 | UNKNOWN = 0; |
| 6197 | ACTIVITY_INFO_MISSING = 1; |
| 6198 | ACTIVITY_INFO_NOT_RESIZABLE = 2; |
| 6199 | DOCUMENT_LAUNCH_NOT_ALWAYS = 3; |
| 6200 | } |
| 6201 | optional Error error = 2 [default = UNKNOWN]; |
| 6202 | } |
| 6203 | |
| 6204 | /** |
Kweku Adams | 8845d01 | 2018-12-11 20:06:45 -0800 | [diff] [blame] | 6205 | * Logs that a constraint for a scheduled job has changed. |
| 6206 | * |
| 6207 | * Logged from: |
| 6208 | * frameworks/base/services/core/java/com/android/server/job/controllers/JobStatus.java |
| 6209 | */ |
| 6210 | message ScheduledJobConstraintChanged { |
| 6211 | repeated AttributionNode attribution_node = 1; |
| 6212 | |
| 6213 | // Name of the job. |
| 6214 | optional string job_name = 2; |
| 6215 | |
| 6216 | optional com.android.server.job.ConstraintEnum constraint = 3; |
| 6217 | |
| 6218 | enum State { |
Kweku Adams | e8db3ab | 2019-02-27 14:30:34 -0800 | [diff] [blame] | 6219 | UNKNOWN = 0; |
| 6220 | UNSATISFIED = 1; |
| 6221 | SATISFIED = 2; |
Kweku Adams | 8845d01 | 2018-12-11 20:06:45 -0800 | [diff] [blame] | 6222 | } |
| 6223 | optional State state = 4; |
| 6224 | } |
Alex Salo | d7c3eef | 2019-01-25 14:43:27 -0800 | [diff] [blame] | 6225 | |
| 6226 | /** |
| 6227 | * Logs PowerManagerService screen timeout resets (extensions) that happen when an attention check |
| 6228 | * returns true. |
| 6229 | * |
| 6230 | * Logged from: |
| 6231 | * frameworks/base/services/core/java/com/android/server/power/PowerManagerService.java |
| 6232 | */ |
| 6233 | message ScreenTimeoutExtensionReported { |
| 6234 | // Describes how many times in a row did the power manager reset the screen off timeout. |
| 6235 | optional uint32 consecutive_timeout_extended_count = 1; |
| 6236 | } |
Hui Yu | 885aca1 | 2019-01-10 17:11:34 -0800 | [diff] [blame] | 6237 | |
| 6238 | /* |
| 6239 | * Logs number of milliseconds it takes to start a process. |
| 6240 | * The definition of app process start time is from the app launch time to |
| 6241 | * the time that Zygote finished forking the app process and loaded the |
| 6242 | * application package's java classes. |
| 6243 | |
| 6244 | * This metric is different from AppStartOccurred which is for foreground |
| 6245 | * activity only. |
| 6246 | |
| 6247 | * ProcessStartTime can report all processes (both foreground and background) |
| 6248 | * start time. |
| 6249 | * |
| 6250 | * Logged from: |
| 6251 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
| 6252 | */ |
| 6253 | message ProcessStartTime { |
| 6254 | // The uid of the ProcessRecord. |
| 6255 | optional int32 uid = 1 [(is_uid) = true]; |
| 6256 | |
| 6257 | // The process pid. |
| 6258 | optional int32 pid = 2; |
| 6259 | |
| 6260 | // The process name. |
| 6261 | // Usually package name, "system" for system server. |
| 6262 | // Provided by ActivityManagerService. |
| 6263 | optional string process_name = 3; |
| 6264 | |
| 6265 | enum StartType { |
| 6266 | UNKNOWN = 0; |
| 6267 | WARM = 1; |
| 6268 | HOT = 2; |
| 6269 | COLD = 3; |
| 6270 | } |
| 6271 | |
| 6272 | // The start type. |
| 6273 | optional StartType type = 4; |
| 6274 | |
| 6275 | // The elapsed realtime at the start of the process. |
| 6276 | optional int64 process_start_time_millis = 5; |
| 6277 | |
| 6278 | // Number of milliseconds it takes to reach bind application. |
| 6279 | optional int32 bind_application_delay_millis = 6; |
| 6280 | |
| 6281 | // Number of milliseconds it takes to finish start of the process. |
| 6282 | optional int32 process_start_delay_millis = 7; |
| 6283 | |
| 6284 | // hostingType field in ProcessRecord, the component type such as "activity", |
| 6285 | // "service", "content provider", "broadcast" or other strings. |
| 6286 | optional string hosting_type = 8; |
| 6287 | |
| 6288 | // hostingNameStr field in ProcessRecord. The component class name that runs |
| 6289 | // in this process. |
| 6290 | optional string hosting_name = 9; |
| 6291 | } |
| 6292 | |
Philip P. Moltmann | f21a350 | 2019-01-30 09:53:04 -0800 | [diff] [blame] | 6293 | /** |
Ray Essick | 8ab04df | 2019-02-15 11:01:02 -0800 | [diff] [blame] | 6294 | * Track Media Codec usage |
| 6295 | * Logged from: |
| 6296 | * frameworks/av/media/libstagefright/MediaCodec.cpp |
| 6297 | * frameworks/av/services/mediaanalytics/statsd_codec.cpp |
| 6298 | */ |
| 6299 | message MediametricsCodecReported { |
| 6300 | optional int64 timestamp_nanos = 1; |
| 6301 | optional string package_name = 2; |
| 6302 | optional int64 package_version_code = 3; |
| 6303 | optional int64 media_apex_version = 4; |
| 6304 | |
| 6305 | optional android.stats.mediametrics.CodecData codec_data = 5 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 6306 | } |
| 6307 | |
| 6308 | /** |
| 6309 | * Track Media Extractor (pulling video/audio streams out of containers) usage |
| 6310 | * Logged from: |
| 6311 | * frameworks/av/media/libstagefright/RemoteMediaExtractor.cpp |
| 6312 | * frameworks/av/services/mediaanalytics/statsd_extractor.cpp |
| 6313 | */ |
| 6314 | message MediametricsExtractorReported { |
| 6315 | optional int64 timestamp_nanos = 1; |
| 6316 | optional string package_name = 2; |
| 6317 | optional int64 package_version_code = 3; |
| 6318 | optional int64 media_apex_version = 4; |
| 6319 | |
| 6320 | optional android.stats.mediametrics.ExtractorData extractor_data = 5 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 6321 | } |
| 6322 | |
| 6323 | /** |
| 6324 | * Track how we arbitrate between microphone/input requests. |
| 6325 | * Logged from |
| 6326 | * frameworks/av/services/audiopolicy/service/AudioPolicyInterfaceImpl.cpp |
| 6327 | * frameworks/av/services/mediaanalytics/statsd_audiopolicy.cpp |
| 6328 | */ |
| 6329 | message MediametricsAudiopolicyReported { |
| 6330 | optional int64 timestamp_nanos = 1; |
| 6331 | optional string package_name = 2; |
| 6332 | optional int64 package_version_code = 3; |
| 6333 | optional int64 media_apex_version = 4; |
| 6334 | |
| 6335 | optional android.stats.mediametrics.AudioPolicyData audiopolicy_data = 5 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 6336 | } |
| 6337 | |
| 6338 | /** |
| 6339 | * Track how we arbitrate between microphone requests. |
| 6340 | * Logged from |
| 6341 | * frameworks/av/media/libaudioclient/AudioRecord.cpp |
| 6342 | * frameworks/av/services/mediaanalytics/statsd_audiorecord.cpp |
| 6343 | */ |
| 6344 | message MediametricsAudiorecordReported { |
| 6345 | optional int64 timestamp_nanos = 1; |
| 6346 | optional string package_name = 2; |
| 6347 | optional int64 package_version_code = 3; |
| 6348 | optional int64 media_apex_version = 4; |
| 6349 | |
| 6350 | optional android.stats.mediametrics.AudioRecordData audiorecord_data = 5 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 6351 | } |
| 6352 | |
| 6353 | /** |
| 6354 | * Track how we arbitrate between microphone/input requests. |
| 6355 | * Logged from |
| 6356 | * frameworks/av/media/libnblog/ReportPerformance.cpp |
| 6357 | * frameworks/av/services/mediaanalytics/statsd_audiothread.cpp |
| 6358 | */ |
| 6359 | message MediametricsAudiothreadReported { |
| 6360 | optional int64 timestamp_nanos = 1; |
| 6361 | optional string package_name = 2; |
| 6362 | optional int64 package_version_code = 3; |
| 6363 | optional int64 media_apex_version = 4; |
| 6364 | |
| 6365 | optional android.stats.mediametrics.AudioThreadData audiothread_data = 5 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 6366 | } |
| 6367 | |
| 6368 | /** |
| 6369 | * Track how we arbitrate between microphone/input requests. |
| 6370 | * Logged from |
| 6371 | * frameworks/av/media/libaudioclient/AudioTrack.cpp |
| 6372 | * frameworks/av/services/mediaanalytics/statsd_audiotrack.cpp |
| 6373 | */ |
| 6374 | message MediametricsAudiotrackReported { |
| 6375 | optional int64 timestamp_nanos = 1; |
| 6376 | optional string package_name = 2; |
| 6377 | optional int64 package_version_code = 3; |
| 6378 | optional int64 media_apex_version = 4; |
| 6379 | |
| 6380 | optional android.stats.mediametrics.AudioTrackData audiotrack_data = 5 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 6381 | } |
| 6382 | |
| 6383 | /** |
| 6384 | * Track information about DRM framework performance |
| 6385 | * Logged from |
| 6386 | * frameworks/av/drm/libmediadrm/DrmHal.cpp |
| 6387 | * frameworks/av/services/mediaanalytics/statsd_drm.cpp |
| 6388 | */ |
| 6389 | message MediametricsMediadrmReported { |
| 6390 | optional int64 timestamp_nanos = 1; |
| 6391 | optional string package_name = 2; |
| 6392 | optional int64 package_version_code = 3; |
| 6393 | optional int64 media_apex_version = 4; |
| 6394 | |
| 6395 | // vendor+description tell about which DRM plugin is in use on this device |
| 6396 | optional string vendor = 5; |
| 6397 | optional string description = 6; |
| 6398 | // from frameworks/av/drm/libmediadrm/protos/metrics.proto |
| 6399 | optional bytes framework_stats = 7 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 6400 | } |
| 6401 | |
| 6402 | /** |
| 6403 | * Track information about the widevine DRM plugin performance |
| 6404 | * Logged from |
| 6405 | * vendor/widevine/libwvdrmengine/cdm/metrics |
| 6406 | * frameworks/av/services/mediaanalytics/statsd_drm.cpp |
| 6407 | */ |
| 6408 | message MediametricsDrmWidevineReported { |
| 6409 | optional int64 timestamp_nanos = 1; |
| 6410 | optional string package_name = 2; |
| 6411 | optional int64 package_version_code = 3; |
| 6412 | optional int64 media_apex_version = 4; |
| 6413 | |
| 6414 | optional bytes vendor_specific_stats = 5 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 6415 | } |
| 6416 | |
| 6417 | /** |
| 6418 | * Track information about recordings (e.g. camcorder) |
| 6419 | * Logged from |
| 6420 | * frameworks/av/media/libmediaplayerservice/StagefrightRecorder.cpp |
| 6421 | * frameworks/av/services/mediaanalytics/statsd_recorder.cpp |
| 6422 | */ |
| 6423 | message MediametricsRecorderReported { |
| 6424 | optional int64 timestamp_nanos = 1; |
| 6425 | optional string package_name = 2; |
| 6426 | optional int64 package_version_code = 3; |
| 6427 | optional int64 media_apex_version = 4; |
| 6428 | |
| 6429 | optional android.stats.mediametrics.RecorderData recorder_data = 5 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 6430 | } |
| 6431 | |
| 6432 | /** |
| 6433 | * Track Media Player usage |
| 6434 | * Logged from: |
| 6435 | * frameworks/av/media/libmediaplayerservice/nuplayer/NuPlayerDriver.cpp |
| 6436 | * frameworks/av/services/mediaanalytics/statsd_nuplayer.cpp |
| 6437 | */ |
| 6438 | message MediametricsNuPlayerReported { |
| 6439 | optional int64 timestamp_nanos = 1; |
| 6440 | optional string package_name = 2; |
| 6441 | optional int64 package_version_code = 3; |
| 6442 | optional int64 media_apex_version = 4; |
| 6443 | |
| 6444 | optional android.stats.mediametrics.NuPlayerData nuplayer_data = 5 [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 6445 | } |
| 6446 | |
| 6447 | /** |
Robert Shih | a4beed3 | 2019-08-19 14:15:23 -0700 | [diff] [blame] | 6448 | * Track Legacy DRM usage |
| 6449 | * Logged from |
| 6450 | * frameworks/av/drm/drmserver/DrmManager.cpp |
| 6451 | */ |
| 6452 | message MediametricsDrmManagerReported { |
| 6453 | optional int64 timestamp_nanos = 1; |
| 6454 | optional string package_name = 2; |
| 6455 | optional int64 package_version_code = 3; |
| 6456 | optional int64 media_apex_version = 4; |
| 6457 | |
| 6458 | enum Method { |
| 6459 | METHOD_NOT_FOUND = -1; |
| 6460 | GET_CONSTRAINTS = 0; |
| 6461 | GET_METADATA = 1; |
| 6462 | CAN_HANDLE = 2; |
| 6463 | PROCESS_DRM_INFO = 3; |
| 6464 | ACQUIRE_DRM_INFO = 4; |
| 6465 | SAVE_RIGHTS = 5; |
| 6466 | GET_ORIGINAL_MIME_TYPE = 6; |
| 6467 | GET_DRM_OBJECT_TYPE = 7; |
| 6468 | CHECK_RIGHTS_STATUS = 8; |
| 6469 | REMOVE_RIGHTS = 9; |
| 6470 | REMOVE_ALL_RIGHTS = 10; |
| 6471 | OPEN_CONVERT_SESSION = 11; |
| 6472 | OPEN_DECRYPT_SESSION = 12; |
| 6473 | } |
| 6474 | |
| 6475 | // plugin_id+description inform which Legacy DRM plugins are still in use on device |
| 6476 | optional string plugin_id = 5; |
| 6477 | optional string description = 6; |
| 6478 | optional Method method = 7; |
| 6479 | optional string mime_types = 8; |
| 6480 | } |
| 6481 | |
| 6482 | /** |
Philip P. Moltmann | f21a350 | 2019-01-30 09:53:04 -0800 | [diff] [blame] | 6483 | * State of a dangerous permission requested by a package |
Stanislav Zholnin | ccb82e4 | 2019-11-29 18:59:49 +0000 | [diff] [blame] | 6484 | * Pulled from: StatsCompanionService |
| 6485 | */ |
Philip P. Moltmann | f21a350 | 2019-01-30 09:53:04 -0800 | [diff] [blame] | 6486 | message DangerousPermissionState { |
| 6487 | // Name of the permission |
| 6488 | optional string permission_name = 1; |
| 6489 | |
| 6490 | // Uid of the package |
| 6491 | optional int32 uid = 2 [(is_uid) = true]; |
| 6492 | |
| 6493 | // Package requesting the permission |
| 6494 | optional string package_name = 3; |
| 6495 | |
| 6496 | // If the permission is granted to the uid |
| 6497 | optional bool is_granted = 4; |
Stanislav Zholnin | 75c3fd1 | 2019-05-21 13:10:51 +0100 | [diff] [blame] | 6498 | |
| 6499 | // Permission flags as per android.content.pm.PermissionFlags |
| 6500 | optional int32 permission_flags = 5; |
Philip P. Moltmann | f21a350 | 2019-01-30 09:53:04 -0800 | [diff] [blame] | 6501 | } |
| 6502 | |
Michael Groover | 4a0ca94 | 2019-01-24 17:41:25 -0800 | [diff] [blame] | 6503 | /** |
| 6504 | * Logs when a package is denied access to a device identifier based on the new access requirements. |
| 6505 | * |
| 6506 | * Logged from: |
| 6507 | * frameworks/base/telephony/java/com/android/internal/telephony/TelephonyPermissions.java |
| 6508 | */ |
| 6509 | message DeviceIdentifierAccessDenied { |
| 6510 | // The name of the package denied access to the requested device identifier. |
| 6511 | optional string package_name = 1; |
| 6512 | |
| 6513 | // The name of the device identifier method the package attempted to invoke. |
| 6514 | optional string method_name = 2; |
| 6515 | |
| 6516 | // True if the package is preinstalled. |
| 6517 | optional bool is_preinstalled = 3; |
| 6518 | |
| 6519 | // True if the package is privileged. |
Sooraj Sasindran | 22b53f4 | 2019-11-27 15:57:33 -0800 | [diff] [blame] | 6520 | // Starting from Android 11, this boolean is not set and will always be false. |
| 6521 | optional bool is_priv_app = 4 [deprecated = true]; |
Michael Groover | 4a0ca94 | 2019-01-24 17:41:25 -0800 | [diff] [blame] | 6522 | } |
Chenjie Yu | e13f44a | 2019-02-07 17:51:38 -0800 | [diff] [blame] | 6523 | |
| 6524 | /** |
Chenjie Yu | e13f44a | 2019-02-07 17:51:38 -0800 | [diff] [blame] | 6525 | * Pulls the ongoing mainline install train version code. |
| 6526 | * Pulled from StatsCompanionService |
| 6527 | */ |
| 6528 | message TrainInfo { |
| 6529 | optional int64 train_version_code = 1; |
| 6530 | |
| 6531 | optional TrainExperimentIds train_experiment_id = 2; |
Muhammad Qureshi | f4ca824 | 2019-03-01 09:20:15 -0800 | [diff] [blame] | 6532 | |
| 6533 | optional string train_name = 3; |
| 6534 | |
| 6535 | enum Status { |
| 6536 | UNKNOWN = 0; |
| 6537 | INSTALL_REQUESTED = 1; |
| 6538 | INSTALL_STARTED = 2; |
| 6539 | INSTALL_STAGED_NOT_READY = 3; |
| 6540 | INSTALL_STAGED_READY = 4; |
| 6541 | INSTALL_SUCCESS = 5; |
Tej Singh | 403fe47 | 2019-04-30 12:54:21 -0700 | [diff] [blame] | 6542 | // Replaced by INSTALL_FAILURE_DOWNLOAD, INSTALL_FAILURE_STATE_MISMATCH, |
| 6543 | // and INSTALL_FAILURE_COMMIT. |
| 6544 | INSTALL_FAILURE = 6 [deprecated = true]; |
| 6545 | // 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] | 6546 | INSTALL_CANCELLED = 7; |
| 6547 | INSTALLER_ROLLBACK_REQUESTED = 8; |
| 6548 | INSTALLER_ROLLBACK_INITIATED = 9; |
| 6549 | INSTALLER_ROLLBACK_INITIATED_FAILURE = 10; |
| 6550 | INSTALLER_ROLLBACK_STAGED = 11; |
| 6551 | INSTALLER_ROLLBACK_STAGED_FAILURE = 12; |
| 6552 | INSTALLER_ROLLBACK_BOOT_TRIGGERED = 13; |
| 6553 | INSTALLER_ROLLBACK_BOOT_TRIGGERED_FAILURE = 14; |
| 6554 | INSTALLER_ROLLBACK_SUCCESS = 15; |
| 6555 | INSTALLER_ROLLBACK_FAILURE = 16; |
Howard Ro | 174ed56 | 2019-04-07 22:17:58 -0700 | [diff] [blame] | 6556 | INSTALLER_ROLLBACK_STAGED_CANCEL_REQUESTED = 17; |
| 6557 | INSTALLER_ROLLBACK_STAGED_CANCEL_SUCCESS = 18; |
| 6558 | INSTALLER_ROLLBACK_STAGED_CANCEL_FAILURE = 19; |
| 6559 | INSTALL_STAGED_CANCEL_REQUESTED = 20; |
| 6560 | INSTALL_STAGED_CANCEL_SUCCESS = 21; |
| 6561 | INSTALL_STAGED_CANCEL_FAILURE = 22; |
Tej Singh | 403fe47 | 2019-04-30 12:54:21 -0700 | [diff] [blame] | 6562 | INSTALL_FAILURE_DOWNLOAD = 23; |
| 6563 | INSTALL_FAILURE_STATE_MISMATCH = 24; |
| 6564 | INSTALL_FAILURE_COMMIT = 25; |
Muhammad Qureshi | f4ca824 | 2019-03-01 09:20:15 -0800 | [diff] [blame] | 6565 | } |
| 6566 | optional Status status = 4; |
Chenjie Yu | e13f44a | 2019-02-07 17:51:38 -0800 | [diff] [blame] | 6567 | } |
joshmccloskey | 8c3322e | 2019-01-09 18:25:57 -0800 | [diff] [blame] | 6568 | |
| 6569 | /** |
| 6570 | * Logs the gesture stage changed event. |
| 6571 | * |
| 6572 | * Logged from: |
| 6573 | * frameworks/base/packages/SystemUI/ |
| 6574 | */ |
| 6575 | message AssistGestureStageReported { |
joshmccloskey | 99f3901 | 2019-02-20 14:45:08 -0800 | [diff] [blame] | 6576 | optional android.hardware.sensor.assist.AssistGestureStageEnum gesture_stage = 1; |
joshmccloskey | 8c3322e | 2019-01-09 18:25:57 -0800 | [diff] [blame] | 6577 | } |
| 6578 | |
| 6579 | /** |
| 6580 | * Logs the feedback type. |
| 6581 | * |
| 6582 | * Logged from: |
| 6583 | * frameworks/base/packages/SystemUI/ |
| 6584 | */ |
| 6585 | message AssistGestureFeedbackReported { |
joshmccloskey | 99f3901 | 2019-02-20 14:45:08 -0800 | [diff] [blame] | 6586 | // Whether or not the gesture was used. |
| 6587 | optional android.hardware.sensor.assist.AssistGestureFeedbackEnum feedback_type = 1; |
joshmccloskey | 8c3322e | 2019-01-09 18:25:57 -0800 | [diff] [blame] | 6588 | } |
| 6589 | |
| 6590 | /** |
| 6591 | * Logs the progress. |
| 6592 | * |
| 6593 | * Logged from: |
| 6594 | * frameworks/base/packages/SystemUI/ |
| 6595 | */ |
| 6596 | message AssistGestureProgressReported { |
joshmccloskey | 99f3901 | 2019-02-20 14:45:08 -0800 | [diff] [blame] | 6597 | // [0,100] progress for the assist gesture. |
| 6598 | optional int32 progress = 1; |
joshmccloskey | 8c3322e | 2019-01-09 18:25:57 -0800 | [diff] [blame] | 6599 | } |
Neil Fuller | db14b48 | 2019-02-05 19:44:44 +0000 | [diff] [blame] | 6600 | |
| 6601 | /* |
| 6602 | * Information about the time zone data on a device. |
| 6603 | */ |
| 6604 | message TimeZoneDataInfo { |
| 6605 | // A version identifier for the data set on device. e.g. "2018i" |
| 6606 | optional string tzdb_version = 1; |
| 6607 | } |
Yiwei Zhang | 5c81b63 | 2019-03-01 15:39:46 -0800 | [diff] [blame] | 6608 | |
Yiwei Zhang | 4fb9289 | 2019-03-04 14:29:25 -0800 | [diff] [blame] | 6609 | /** |
Yiwei Zhang | 5c81b63 | 2019-03-01 15:39:46 -0800 | [diff] [blame] | 6610 | * Logs the GPU stats global health information. |
| 6611 | * |
| 6612 | * Logged from: |
| 6613 | * frameworks/native/services/gpuservice/gpustats/ |
| 6614 | */ |
| 6615 | message GpuStatsGlobalInfo { |
| 6616 | // Package name of the gpu driver. |
| 6617 | optional string driver_package_name = 1; |
| 6618 | |
| 6619 | // Version name of the gpu driver. |
| 6620 | optional string driver_version_name = 2; |
| 6621 | |
| 6622 | // Version code of the gpu driver. |
| 6623 | optional int64 driver_version_code = 3; |
| 6624 | |
| 6625 | // Build time of the gpu driver in UTC as seconds since January 1, 1970. |
| 6626 | optional int64 driver_build_time = 4; |
| 6627 | |
| 6628 | // Total count of the gl driver gets loaded. |
| 6629 | optional int64 gl_loading_count = 5; |
| 6630 | |
| 6631 | // Total count of the gl driver fails to be loaded. |
| 6632 | optional int64 gl_loading_failure_count = 6; |
| 6633 | |
| 6634 | // Total count of the Vulkan driver gets loaded. |
| 6635 | optional int64 vk_loading_count = 7; |
| 6636 | |
| 6637 | // Total count of the Vulkan driver fails to be loaded. |
| 6638 | optional int64 vk_loading_failure_count = 8; |
Yiwei Zhang | 63852d2a | 2019-05-06 19:31:20 -0700 | [diff] [blame] | 6639 | |
| 6640 | // Api version of the system Vulkan driver. |
| 6641 | optional int32 vulkan_version = 9; |
| 6642 | |
| 6643 | // Api version of the system CPU Vulkan driver. |
| 6644 | optional int32 cpu_vulkan_version = 10; |
| 6645 | |
| 6646 | // Api version of the system GLES driver. |
| 6647 | optional int32 gles_version = 11; |
Yiwei Zhang | a0f5fef | 2019-05-08 16:30:47 -0700 | [diff] [blame] | 6648 | |
| 6649 | // Total count of the angle driver gets loaded. |
| 6650 | optional int64 angle_loading_count = 12; |
| 6651 | |
| 6652 | // Total count of the angle driver fails to be loaded. |
| 6653 | optional int64 angle_loading_failure_count = 13; |
Yiwei Zhang | 5c81b63 | 2019-03-01 15:39:46 -0800 | [diff] [blame] | 6654 | } |
| 6655 | |
Yiwei Zhang | 4fb9289 | 2019-03-04 14:29:25 -0800 | [diff] [blame] | 6656 | /** |
| 6657 | * GPU driver loading time info. |
| 6658 | */ |
| 6659 | message GpuDriverLoadingTime { |
| 6660 | // List of all the driver loading times for this app. The list size is |
| 6661 | // capped at 50. |
| 6662 | repeated int64 driver_loading_time = 1; |
| 6663 | } |
| 6664 | |
| 6665 | /** |
Yiwei Zhang | 5c81b63 | 2019-03-01 15:39:46 -0800 | [diff] [blame] | 6666 | * Logs the GPU stats per app health information. |
| 6667 | * |
| 6668 | * Logged from: |
| 6669 | * frameworks/native/services/gpuservice/gpustats/ |
| 6670 | */ |
| 6671 | message GpuStatsAppInfo { |
Yiwei Zhang | 4fb9289 | 2019-03-04 14:29:25 -0800 | [diff] [blame] | 6672 | // Package name of the application that loads the gpu driver. Total number |
| 6673 | // of different packages is capped at 100. |
Yiwei Zhang | 5c81b63 | 2019-03-01 15:39:46 -0800 | [diff] [blame] | 6674 | optional string app_package_name = 1; |
| 6675 | |
| 6676 | // Version code of the gpu driver this app loads. |
| 6677 | optional int64 driver_version_code = 2; |
| 6678 | |
Yiwei Zhang | 4fb9289 | 2019-03-04 14:29:25 -0800 | [diff] [blame] | 6679 | // gl driver loading time info. |
| 6680 | optional GpuDriverLoadingTime gl_driver_loading_time = 3 |
| 6681 | [(android.os.statsd.log_mode) = MODE_BYTES]; |
Yiwei Zhang | 5c81b63 | 2019-03-01 15:39:46 -0800 | [diff] [blame] | 6682 | |
Yiwei Zhang | 4fb9289 | 2019-03-04 14:29:25 -0800 | [diff] [blame] | 6683 | // Vulkan driver loading time info. |
| 6684 | optional GpuDriverLoadingTime vk_driver_loading_time = 4 |
| 6685 | [(android.os.statsd.log_mode) = MODE_BYTES]; |
Yiwei Zhang | a0f5fef | 2019-05-08 16:30:47 -0700 | [diff] [blame] | 6686 | |
| 6687 | // Angle driver loading time info. |
| 6688 | optional GpuDriverLoadingTime angle_driver_loading_time = 5 |
| 6689 | [(android.os.statsd.log_mode) = MODE_BYTES]; |
Yiwei Zhang | 7c70930 | 2019-05-09 15:00:46 -0700 | [diff] [blame] | 6690 | |
| 6691 | // CPU Vulkan implementation is in use. |
| 6692 | optional bool cpu_vulkan_in_use = 6; |
Yiwei Zhang | a763861 | 2019-07-03 17:34:12 -0700 | [diff] [blame] | 6693 | |
| 6694 | // App is not doing pre-rotation correctly. |
| 6695 | optional bool false_prerotation = 7; |
Yiwei Zhang | f02cf6b | 2019-12-20 14:51:07 -0800 | [diff] [blame] | 6696 | |
| 6697 | // App creates GLESv1 context. |
| 6698 | optional bool gles_1_in_use = 8; |
Yiwei Zhang | 5c81b63 | 2019-03-01 15:39:46 -0800 | [diff] [blame] | 6699 | } |
Rafal Slawik | d4e8757 | 2019-03-12 13:08:38 +0000 | [diff] [blame] | 6700 | |
| 6701 | /* |
| 6702 | * Logs the size of the system ion heap. |
| 6703 | * |
| 6704 | * Pulled from StatsCompanionService. |
| 6705 | */ |
| 6706 | message SystemIonHeapSize { |
| 6707 | // Size of the system ion heap in bytes. |
| 6708 | optional int64 size_in_bytes = 1; |
| 6709 | } |
Chiachang Wang | 0e88ebf | 2019-03-21 10:18:07 +0800 | [diff] [blame] | 6710 | |
Rafal Slawik | 77987ed | 2019-06-17 12:28:23 +0100 | [diff] [blame] | 6711 | /* |
| 6712 | * Logs the per-process size of the system ion heap. |
| 6713 | * |
| 6714 | * Pulled from StatsCompanionService. |
| 6715 | */ |
| 6716 | message ProcessSystemIonHeapSize { |
| 6717 | // The uid if available. -1 means not available. |
| 6718 | optional int32 uid = 1 [(is_uid) = true]; |
| 6719 | |
| 6720 | // The process name (from /proc/PID/cmdline). |
| 6721 | optional string process_name = 2; |
| 6722 | |
| 6723 | // Sum of sizes of all allocations. |
| 6724 | optional int32 total_size_in_kilobytes = 3; |
| 6725 | |
| 6726 | // Number of allocations. |
| 6727 | optional int32 allocation_count = 4; |
| 6728 | |
| 6729 | // Size of the largest allocation. |
| 6730 | optional int32 max_size_in_kilobytes = 5; |
| 6731 | } |
| 6732 | |
Chiachang Wang | 0e88ebf | 2019-03-21 10:18:07 +0800 | [diff] [blame] | 6733 | /** |
| 6734 | * Push network stack events. |
| 6735 | * |
| 6736 | * Log from: |
| 6737 | * frameworks/base/packages/NetworkStack/ |
| 6738 | */ |
| 6739 | message NetworkStackReported { |
Chiachang Wang | 729d267 | 2019-03-27 17:33:52 +0800 | [diff] [blame] | 6740 | // The id that indicates the event reported from NetworkStack. |
| 6741 | optional int32 event_id = 1; |
| 6742 | // The data for the reported events. |
Chiachang Wang | 0e88ebf | 2019-03-21 10:18:07 +0800 | [diff] [blame] | 6743 | optional android.stats.connectivity.NetworkStackEventData network_stack_event = 2 [(log_mode) = MODE_BYTES]; |
| 6744 | } |
Carmen Agimof | a769c15 | 2019-03-04 14:39:14 +0000 | [diff] [blame] | 6745 | |
| 6746 | /** |
| 6747 | * Logs the apps that are installed on the external storage. |
| 6748 | * Pulled from: |
| 6749 | * StatsCompanionService |
| 6750 | */ |
| 6751 | message AppsOnExternalStorageInfo { |
| 6752 | // The type of the external storage. |
| 6753 | optional android.stats.storage.ExternalStorageType external_storage_type = 1; |
| 6754 | // The name of the package that is installed on the external storage. |
| 6755 | optional string package_name = 2; |
| 6756 | } |
joshmccloskey | 34c1f8e | 2019-04-11 14:06:43 -0700 | [diff] [blame] | 6757 | |
| 6758 | /** |
| 6759 | * Logs the settings related to Face. |
| 6760 | * Logged from: |
| 6761 | * frameworks/base/services/core/java/com/android/server/stats |
| 6762 | */ |
| 6763 | message FaceSettings { |
| 6764 | // Whether or not face unlock is allowed on Keyguard. |
| 6765 | optional bool unlock_keyguard_enabled = 1; |
| 6766 | // Whether or not face unlock dismisses the Keyguard. |
| 6767 | optional bool unlock_dismisses_keyguard = 2; |
| 6768 | // Whether or not face unlock requires attention. |
| 6769 | optional bool unlock_attention_required = 3; |
| 6770 | // Whether or not face unlock is allowed for apps (through BiometricPrompt). |
| 6771 | optional bool unlock_app_enabled = 4; |
| 6772 | // Whether or not face unlock always requires user confirmation. |
| 6773 | optional bool unlock_always_require_confirmation = 5; |
| 6774 | // Whether or not a diverse set of poses are required during enrollment. |
| 6775 | optional bool unlock_diversity_required = 6; |
| 6776 | } |
Maggie White | 442b631 | 2019-04-05 16:26:44 -0700 | [diff] [blame] | 6777 | |
| 6778 | /** |
| 6779 | * Logs cooling devices maintained by the kernel. |
| 6780 | * |
| 6781 | * Pulled from StatsCompanionService.java |
| 6782 | */ |
| 6783 | message CoolingDevice { |
| 6784 | // The type of cooling device being reported. Eg. CPU, GPU... |
| 6785 | optional android.os.CoolingTypeEnum device_location = 1; |
| 6786 | // The name of the cooling device source. Eg. CPU0 |
| 6787 | optional string device_name = 2; |
| 6788 | // Current throttle state of the cooling device. The value can any unsigned |
| 6789 | // integer between 0 and max_state defined in its driver. 0 means device is |
| 6790 | // not in throttling, higher value means deeper throttling. |
| 6791 | optional int32 state = 3; |
| 6792 | } |
Ben Blount | 763a5d5 | 2019-04-10 11:48:58 -0700 | [diff] [blame] | 6793 | |
| 6794 | /** |
| 6795 | * Intelligence has several counter-type events that don't warrant a |
| 6796 | * full separate atom. These are primarily API call counters but also include |
| 6797 | * counters for feature usage and specific failure modes. |
| 6798 | * |
| 6799 | * Logged from the Intelligence mainline module. |
| 6800 | */ |
| 6801 | message IntelligenceEventReported { |
Ben Blount | 3658fa7 | 2019-04-22 17:31:40 -0700 | [diff] [blame] | 6802 | // The event type. |
Ben Blount | 763a5d5 | 2019-04-10 11:48:58 -0700 | [diff] [blame] | 6803 | optional android.stats.intelligence.EventType event_id = 1; |
Ben Blount | 3658fa7 | 2019-04-22 17:31:40 -0700 | [diff] [blame] | 6804 | // Success, failure. |
Ben Blount | 763a5d5 | 2019-04-10 11:48:58 -0700 | [diff] [blame] | 6805 | optional android.stats.intelligence.Status status = 2; |
Ben Blount | 3658fa7 | 2019-04-22 17:31:40 -0700 | [diff] [blame] | 6806 | // How many times the event occured (to report a batch of high frequency events). |
| 6807 | optional int32 count = 3; |
Ben Blount | e3223f3d | 2019-05-02 22:49:03 -0700 | [diff] [blame] | 6808 | // How long the event took (sum of durations if count > 1) |
Ben Blount | 3658fa7 | 2019-04-22 17:31:40 -0700 | [diff] [blame] | 6809 | optional int64 duration_millis = 4; |
Ben Blount | 763a5d5 | 2019-04-10 11:48:58 -0700 | [diff] [blame] | 6810 | } |
Andrew T Nguyen | ee615d6 | 2019-05-01 14:40:19 -0700 | [diff] [blame] | 6811 | |
| 6812 | /** |
Yuncheol Heo | d1a85d2 | 2019-05-08 17:13:42 -0700 | [diff] [blame] | 6813 | * Logs when Car Power state changed. |
| 6814 | * |
| 6815 | * Logged from: |
| 6816 | * packages/services/Car/service/src/com/android/car/CarStatsLog.java |
| 6817 | */ |
| 6818 | message CarPowerStateChanged { |
| 6819 | // States come from CpmsState in CarPowerManagementService.java. |
| 6820 | enum State { |
| 6821 | WAIT_FOR_VHAL = 0; |
| 6822 | ON = 1; |
| 6823 | SHUTDOWN_PREPARE = 2; |
| 6824 | WAIT_FOR_FINISH = 3; |
| 6825 | SUSPEND = 4; |
| 6826 | SIMULATE_SLEEP = 5; |
| 6827 | } |
| 6828 | optional State state = 1; |
| 6829 | } |
| 6830 | |
| 6831 | /** |
| 6832 | * Logs whether GarageMode is entered. |
| 6833 | * |
| 6834 | * Logged from: |
| 6835 | * packages/services/Car/service/src/com/android/car/CarStatsLog.java |
| 6836 | */ |
| 6837 | message GarageModeInfo { |
| 6838 | // Whether GarageMode is entered. |
| 6839 | optional bool is_garage_mode = 1; |
| 6840 | } |
Martijn Coenen | cd95d46 | 2019-04-25 17:09:45 +0200 | [diff] [blame] | 6841 | |
| 6842 | /** |
| 6843 | * Historical app ops data per package. |
| 6844 | */ |
| 6845 | message AppOps { |
| 6846 | // Uid of the package requesting the op |
| 6847 | optional int32 uid = 1 [(is_uid) = true]; |
| 6848 | |
| 6849 | // Nmae of the package performing the op |
| 6850 | optional string package_name = 2; |
| 6851 | |
| 6852 | // operation id; maps to the OP_* constants in AppOpsManager.java |
| 6853 | optional int32 op_id = 3; |
| 6854 | |
| 6855 | // The number of times the op was granted while the app was in the |
| 6856 | // foreground (only for trusted requests) |
| 6857 | optional int64 trusted_foreground_granted_count = 4; |
| 6858 | |
| 6859 | // The number of times the op was granted while the app was in the |
| 6860 | // background (only for trusted requests) |
| 6861 | optional int64 trusted_background_granted_count = 5; |
| 6862 | |
| 6863 | // The number of times the op was rejected while the app was in the |
| 6864 | // foreground (only for trusted requests) |
| 6865 | optional int64 trusted_foreground_rejected_count = 6; |
| 6866 | |
| 6867 | // The number of times the op was rejected while the app was in the |
| 6868 | // background (only for trusted requests) |
| 6869 | optional int64 trusted_background_rejected_count = 7; |
| 6870 | |
| 6871 | // For long-running operations, total duration of the operation |
| 6872 | // while the app was in the foreground (only for trusted requests) |
| 6873 | optional int64 trusted_foreground_duration_millis = 8; |
| 6874 | |
| 6875 | // For long-running operations, total duration of the operation |
| 6876 | // while the app was in the background (only for trusted requests) |
| 6877 | optional int64 trusted_background_duration_millis = 9; |
Stanislav Zholnin | 42d710e | 2019-11-28 13:11:54 +0000 | [diff] [blame] | 6878 | |
| 6879 | // Whether AppOps is guarded by Runtime permission |
| 6880 | optional bool is_runtime_permission = 10; |
Martijn Coenen | cd95d46 | 2019-04-25 17:09:45 +0200 | [diff] [blame] | 6881 | } |
Hongyi Zhang | 700137e | 2019-05-23 21:19:36 -0700 | [diff] [blame] | 6882 | |
| 6883 | /** |
| 6884 | * Location Manager API Usage information(e.g. API under usage, |
| 6885 | * API call's parameters). |
| 6886 | * Logged from: |
| 6887 | * frameworks/base/services/core/java/com/android/server/LocationManagerService.java |
| 6888 | */ |
| 6889 | message LocationManagerApiUsageReported { |
| 6890 | |
| 6891 | // Indicating if usage starts or usage ends. |
| 6892 | optional android.stats.location.UsageState state = 1; |
| 6893 | |
| 6894 | // LocationManagerService's API in use. |
| 6895 | // We can identify which API from LocationManager is |
| 6896 | // invoking current LMS API by the combination of |
| 6897 | // API parameter(e.g. is_listener_null, is_intent_null, |
| 6898 | // is_location_request_null) |
| 6899 | optional android.stats.location.LocationManagerServiceApi api_in_use = 2; |
| 6900 | |
| 6901 | // Name of the package calling the API. |
| 6902 | optional string calling_package_name = 3; |
| 6903 | |
| 6904 | // Type of the location provider. |
| 6905 | optional android.stats.location.ProviderType provider = 4; |
| 6906 | |
| 6907 | // Quality of the location request |
| 6908 | optional android.stats.location.LocationRequestQuality quality = 5; |
| 6909 | |
| 6910 | // The desired interval for active location updates, in milliseconds. |
| 6911 | // Bucketized to reduce cardinality. |
| 6912 | optional android.stats.location.LocationRequestIntervalBucket bucketized_interval = 6; |
| 6913 | |
| 6914 | // Minimum distance between location updates, in meters. |
| 6915 | // Bucketized to reduce cardinality. |
| 6916 | optional android.stats.location.SmallestDisplacementBucket |
| 6917 | bucketized_smallest_displacement = 7; |
| 6918 | |
| 6919 | // The number of location updates. |
| 6920 | optional int64 num_updates = 8; |
| 6921 | |
| 6922 | // The request expiration time, in millisecond since boot. |
| 6923 | // Bucketized to reduce cardinality. |
| 6924 | optional android.stats.location.ExpirationBucket |
| 6925 | bucketized_expire_in = 9; |
| 6926 | |
| 6927 | // Type of Callback passed in for this API. |
| 6928 | optional android.stats.location.CallbackType callback_type = 10; |
| 6929 | |
| 6930 | // The radius of the central point of the alert |
| 6931 | // region, in meters. Only for API REQUEST_GEOFENCE. |
| 6932 | // Bucketized to reduce cardinality. |
| 6933 | optional android.stats.location.GeofenceRadiusBucket bucketized_radius = 11; |
| 6934 | |
| 6935 | // Activity Importance of API caller. |
| 6936 | // Categorized to 3 types that are interesting from location's perspective. |
| 6937 | optional android.stats.location.ActivityImportance activiy_importance = 12; |
| 6938 | } |
Stanislav Zholnin | 3d215df1 | 2019-06-05 16:48:20 +0100 | [diff] [blame] | 6939 | |
| 6940 | /** |
| 6941 | * Information about a permission grant or denial made by user inside ReviewPermissionsFragment |
| 6942 | */ |
| 6943 | message ReviewPermissionsFragmentResultReported { |
| 6944 | // unique value identifying a permission group change. A permission group change might result |
| 6945 | // in multiple of these atoms |
| 6946 | optional int64 change_id = 1; |
| 6947 | |
| 6948 | // UID of package the permission belongs to |
| 6949 | optional int32 uid = 2 [(is_uid) = true]; |
| 6950 | |
| 6951 | // Name of package the permission belongs to |
| 6952 | optional string package_name = 3; |
| 6953 | |
| 6954 | // The permission to be granted |
| 6955 | optional string permission_name = 4; |
| 6956 | |
| 6957 | // The result of the permission grant |
| 6958 | optional bool permission_granted = 5; |
| 6959 | } |
Stanislav Zholnin | 247d1b7 | 2019-06-06 21:28:44 +0100 | [diff] [blame] | 6960 | |
| 6961 | /** |
| 6962 | * Information about results of permission upgrade by RuntimePermissionsUpgradeController |
| 6963 | * Logged from: RuntimePermissionUpdgradeController |
| 6964 | */ |
| 6965 | message RuntimePermissionsUpgradeResult { |
| 6966 | // Permission granted as result of upgrade |
| 6967 | optional string permission_name = 1; |
| 6968 | |
| 6969 | // UID of package granted permission |
| 6970 | optional int32 uid = 2 [(is_uid) = true]; |
| 6971 | |
| 6972 | // Name of package granted permission |
| 6973 | optional string package_name = 3; |
Stanislav Zholnin | bdf620b | 2019-06-06 22:38:33 +0100 | [diff] [blame] | 6974 | } |
| 6975 | |
| 6976 | /** |
| 6977 | * Information about a buttons presented in GrantPermissionsActivty and choice made by user |
| 6978 | */ |
| 6979 | message GrantPermissionsActivityButtonActions { |
| 6980 | // Permission granted as result of upgrade |
| 6981 | optional string permission_group_name = 1; |
| 6982 | |
| 6983 | // UID of package granted permission |
| 6984 | optional int32 uid = 2 [(is_uid) = true]; |
| 6985 | |
| 6986 | // Name of package requesting permission |
| 6987 | optional string package_name = 3; |
| 6988 | |
| 6989 | // Buttons presented in the dialog - bit flags, bit numbers are in accordance with |
| 6990 | // LABEL_ constants in GrantPermissionActivity.java |
| 6991 | optional int32 buttons_presented = 4; |
| 6992 | |
| 6993 | // Button clicked by user - same as bit flags in buttons_presented with only single bit set |
| 6994 | optional int32 button_clicked = 5; |
| 6995 | } |
Stanislav Zholnin | 375e2ab | 2019-05-29 13:07:35 +0100 | [diff] [blame] | 6996 | |
| 6997 | /** |
| 6998 | * Information about LocationAccessCheck notification presented to user |
| 6999 | */ |
| 7000 | message LocationAccessCheckNotificationAction { |
| 7001 | |
| 7002 | // id which identifies single session of user interacting with permission controller |
| 7003 | optional int64 session_id = 1; |
| 7004 | |
| 7005 | // Uid of package for which location access check is presented |
| 7006 | optional int32 package_uid = 2; |
| 7007 | |
| 7008 | // Name of package for which location access check is presented |
| 7009 | optional string package_name = 3; |
| 7010 | |
| 7011 | enum Result { |
| 7012 | UNDEFINED = 0; |
| 7013 | // notification was presented to the user |
| 7014 | NOTIFICATION_PRESENTED = 1; |
| 7015 | // notification was declined by the user |
| 7016 | NOTIFICATION_DECLINED = 2; |
| 7017 | // notification was clicked by the user |
| 7018 | NOTIFICATION_CLICKED = 3; |
| 7019 | } |
| 7020 | |
| 7021 | // View / interaction recorded |
| 7022 | optional Result result = 4; |
| 7023 | } |
Stanislav Zholnin | 3e0f9bc | 2019-05-23 19:03:55 +0100 | [diff] [blame] | 7024 | |
| 7025 | /** |
| 7026 | * Information about a permission grant or revoke made by user inside AppPermissionFragment |
| 7027 | */ |
| 7028 | message AppPermissionFragmentActionReported { |
| 7029 | // id which identifies single session of user interacting with permission controller |
| 7030 | optional int64 session_id = 1; |
| 7031 | |
| 7032 | // unique value identifying a permission group change. A permission group change might result |
| 7033 | // in multiple of these atoms |
| 7034 | optional int64 change_id = 2; |
| 7035 | |
| 7036 | // UID of package the permission belongs to |
| 7037 | optional int32 uid = 3 [(is_uid) = true]; |
| 7038 | |
| 7039 | // Name of package the permission belongs to |
| 7040 | optional string package_name = 4; |
| 7041 | |
| 7042 | // The permission to be granted |
| 7043 | optional string permission_name = 5; |
| 7044 | |
| 7045 | // The result of the permission grant |
| 7046 | optional bool permission_granted = 6; |
| 7047 | } |
Stanislav Zholnin | c9dda9e | 2019-06-02 20:50:13 +0100 | [diff] [blame] | 7048 | |
| 7049 | /** |
| 7050 | * Information about a AppPermissionFragment viewed by user |
| 7051 | */ |
| 7052 | message AppPermissionFragmentViewed { |
| 7053 | // id which identifies single session of user interacting with permission controller |
| 7054 | optional int64 session_id = 1; |
| 7055 | |
| 7056 | // UID of package for which permissions are viewed |
| 7057 | optional int32 uid = 2 [(is_uid) = true]; |
| 7058 | |
| 7059 | // Name of package for which permissions are viewed |
| 7060 | optional string package_name = 3; |
| 7061 | |
| 7062 | // Permission group viewed |
| 7063 | optional string permission_group_name = 4; |
| 7064 | } |
Stanislav Zholnin | dc3e2b3 | 2019-06-06 18:10:14 +0100 | [diff] [blame] | 7065 | |
| 7066 | /** |
| 7067 | * Information about a AppPermissionsFragment viewed by user |
| 7068 | */ |
| 7069 | message AppPermissionsFragmentViewed { |
| 7070 | // id which identifies single session of user interacting with permission controller |
| 7071 | optional int64 session_id = 1; |
| 7072 | |
| 7073 | // id which identifies single view as every view might have several logging records |
| 7074 | // with different package information attached |
| 7075 | optional int64 view_id = 2; |
| 7076 | |
| 7077 | // Permission group viewed |
| 7078 | optional string permission_group_name = 3; |
| 7079 | |
| 7080 | // UID of package for which permissions are viewed |
| 7081 | optional int32 uid = 4 [(is_uid) = true]; |
| 7082 | |
| 7083 | // Name of package for which permissions are viewed |
| 7084 | optional string package_name = 5; |
| 7085 | |
| 7086 | // Category in which permission is included |
| 7087 | enum Category { |
| 7088 | UNDEFINED = 0; |
| 7089 | ALLOWED = 1; |
| 7090 | ALLOWED_FOREGROUND = 2; |
| 7091 | DENIED = 3; |
| 7092 | } |
| 7093 | optional Category category = 6; |
| 7094 | } |
Stanislav Zholnin | 32a89c1 | 2019-06-04 14:59:21 +0100 | [diff] [blame] | 7095 | |
| 7096 | /** |
| 7097 | * Information about a PermissionAppsFragment viewed by user. |
| 7098 | * Logged from ui/handheld/PermissionAppsFragment.java |
| 7099 | */ |
| 7100 | message PermissionAppsFragmentViewed { |
| 7101 | // id which identifies single session of user interacting with permission controller |
| 7102 | optional int64 session_id = 1; |
| 7103 | |
| 7104 | // id which identifies single view as every view might have several logging records |
| 7105 | // with different package information attached |
| 7106 | optional int64 view_id = 2; |
| 7107 | |
| 7108 | // Permission group viewed |
| 7109 | optional string permission_group_name = 3; |
| 7110 | |
| 7111 | // UID of package for which permissions are viewed |
| 7112 | optional int32 uid = 4 [(is_uid) = true]; |
| 7113 | |
| 7114 | // Name of package for which permissions are viewed |
| 7115 | optional string package_name = 5; |
| 7116 | |
| 7117 | // Category in which app is included |
| 7118 | enum Category { |
| 7119 | UNDEFINED = 0; |
| 7120 | ALLOWED = 1; |
| 7121 | ALLOWED_FOREGROUND = 2; |
| 7122 | DENIED = 3; |
| 7123 | } |
| 7124 | optional Category category = 6; |
| 7125 | } |
Tony Mak | e2b1b67 | 2019-07-29 16:59:47 +0100 | [diff] [blame] | 7126 | |
| 7127 | /** |
| 7128 | * Logs when there is a smart selection related event. |
| 7129 | * See frameworks/base/core/java/android/view/textclassifier/TextClassifierEvent.java |
| 7130 | * Logged from: TextClassifierEventLogger.java |
| 7131 | */ |
| 7132 | message TextSelectionEvent { |
| 7133 | // A session ID. |
| 7134 | optional string session_id = 1; |
| 7135 | |
| 7136 | // Event type of this event. |
| 7137 | optional android.stats.textclassifier.EventType event_type = 2; |
| 7138 | |
Tony Mak | 9c84bd2 | 2019-12-09 07:27:25 +0000 | [diff] [blame] | 7139 | // Name of the annotator model that is involved in this event. |
Tony Mak | e2b1b67 | 2019-07-29 16:59:47 +0100 | [diff] [blame] | 7140 | optional string model_name = 3; |
| 7141 | |
| 7142 | // Type of widget that was involved in triggering this event. |
| 7143 | optional android.stats.textclassifier.WidgetType widget_type = 4; |
| 7144 | |
| 7145 | // Index of this event in a session. |
| 7146 | optional int32 event_index = 5; |
| 7147 | |
| 7148 | // Entity type that is involved. |
| 7149 | optional string entity_type = 6; |
| 7150 | |
| 7151 | // Relative word index of the start of the selection. |
| 7152 | optional int32 relative_word_start_index = 7; |
| 7153 | |
| 7154 | // Relative word (exclusive) index of the end of the selection. |
| 7155 | optional int32 relative_word_end_index = 8; |
| 7156 | |
| 7157 | // Relative word index of the start of the smart selection. |
| 7158 | optional int32 relative_suggested_word_start_index = 9; |
| 7159 | |
| 7160 | // Relative word (exclusive) index of the end of the smart selection. |
| 7161 | optional int32 relative_suggested_word_end_index = 10; |
Tony Mak | 98b59f0 | 2019-08-07 11:50:58 +0100 | [diff] [blame] | 7162 | |
| 7163 | // Name of source package. |
| 7164 | optional string package_name = 11; |
Tony Mak | e2b1b67 | 2019-07-29 16:59:47 +0100 | [diff] [blame] | 7165 | } |
| 7166 | |
| 7167 | /** |
| 7168 | * Logs when there is a smart linkify related event. |
| 7169 | * See frameworks/base/core/java/android/view/textclassifier/TextClassifierEvent.java |
| 7170 | * Logged from: TextClassifierEventLogger.java |
| 7171 | */ |
| 7172 | message TextLinkifyEvent { |
| 7173 | // A session ID. |
| 7174 | optional string session_id = 1; |
| 7175 | |
| 7176 | // Event type of this event. |
| 7177 | optional android.stats.textclassifier.EventType event_type = 2; |
| 7178 | |
Tony Mak | 9c84bd2 | 2019-12-09 07:27:25 +0000 | [diff] [blame] | 7179 | // Name of the annotator model that is involved in this event. |
Tony Mak | e2b1b67 | 2019-07-29 16:59:47 +0100 | [diff] [blame] | 7180 | optional string model_name = 3; |
| 7181 | |
| 7182 | // Type of widget that was involved in triggering this event. |
| 7183 | optional android.stats.textclassifier.WidgetType widget_type = 4; |
| 7184 | |
| 7185 | // Index of this event in a session. |
| 7186 | optional int32 event_index = 5; |
| 7187 | |
| 7188 | // Entity type that is involved. |
| 7189 | optional string entity_type = 6; |
| 7190 | |
| 7191 | // Number of links detected. |
| 7192 | optional int32 num_links = 7; |
| 7193 | |
| 7194 | // The total length of all links. |
| 7195 | optional int32 linked_text_length = 8; |
| 7196 | |
| 7197 | // Length of input text. |
| 7198 | optional int32 text_length = 9; |
| 7199 | |
| 7200 | // Time spent on generating links in ms. |
| 7201 | optional int64 latency_millis = 10; |
Tony Mak | 98b59f0 | 2019-08-07 11:50:58 +0100 | [diff] [blame] | 7202 | |
| 7203 | // Name of source package. |
| 7204 | optional string package_name = 11; |
Tony Mak | e2b1b67 | 2019-07-29 16:59:47 +0100 | [diff] [blame] | 7205 | } |
| 7206 | |
| 7207 | /** |
| 7208 | * Logs when there is a conversation actions related event. |
| 7209 | * See frameworks/base/core/java/android/view/textclassifier/TextClassifierEvent.java |
| 7210 | * Logged from: TextClassifierEventLogger.java |
| 7211 | */ |
| 7212 | message ConversationActionsEvent { |
| 7213 | // A session ID. |
| 7214 | optional string session_id = 1; |
| 7215 | |
| 7216 | // Event type of this event. |
| 7217 | optional android.stats.textclassifier.EventType event_type = 2; |
| 7218 | |
Tony Mak | 9c84bd2 | 2019-12-09 07:27:25 +0000 | [diff] [blame] | 7219 | // Name of the actions model that is involved in this event. |
Tony Mak | e2b1b67 | 2019-07-29 16:59:47 +0100 | [diff] [blame] | 7220 | optional string model_name = 3; |
| 7221 | |
| 7222 | // Type of widget that was involved in triggering this event. |
| 7223 | optional android.stats.textclassifier.WidgetType widget_type = 4; |
| 7224 | |
| 7225 | // The first entity type that is involved. |
| 7226 | optional string first_entity_type = 5; |
| 7227 | |
| 7228 | // The second entity type that is involved. |
| 7229 | optional string second_entity_type = 6; |
| 7230 | |
| 7231 | // The third entity type that is involved. |
| 7232 | optional string third_entity_type = 7; |
| 7233 | |
| 7234 | // The score of the first entity type. |
| 7235 | optional float score = 8; |
Tony Mak | 98b59f0 | 2019-08-07 11:50:58 +0100 | [diff] [blame] | 7236 | |
| 7237 | // Name of source package. |
| 7238 | optional string package_name = 9; |
Tony Mak | 9c84bd2 | 2019-12-09 07:27:25 +0000 | [diff] [blame] | 7239 | |
| 7240 | // Name of the annotator model that is involved in this event. |
| 7241 | optional string annotator_model_name = 10; |
Tony Mak | e2b1b67 | 2019-07-29 16:59:47 +0100 | [diff] [blame] | 7242 | } |
| 7243 | |
| 7244 | /** |
| 7245 | * Logs when there is a language detection related event. |
| 7246 | * See frameworks/base/core/java/android/view/textclassifier/TextClassifierEvent.java |
| 7247 | * Logged from: TextClassifierEventLogger.java |
| 7248 | */ |
| 7249 | message LanguageDetectionEvent { |
| 7250 | // A session ID. |
| 7251 | optional string session_id = 1; |
| 7252 | |
| 7253 | // Event type of this event. |
| 7254 | optional android.stats.textclassifier.EventType event_type = 2; |
| 7255 | |
Tony Mak | 9c84bd2 | 2019-12-09 07:27:25 +0000 | [diff] [blame] | 7256 | // Name of the language detection model that is involved in this event. |
Tony Mak | e2b1b67 | 2019-07-29 16:59:47 +0100 | [diff] [blame] | 7257 | optional string model_name = 3; |
| 7258 | |
| 7259 | // Type of widget that was involved in triggering this event. |
| 7260 | optional android.stats.textclassifier.WidgetType widget_type = 4; |
| 7261 | |
| 7262 | // Detected language. |
| 7263 | optional string language_tag = 5; |
| 7264 | |
| 7265 | // Score of the detected language. |
| 7266 | optional float score = 6; |
| 7267 | |
| 7268 | // Position of this action. |
| 7269 | optional int32 action_index = 7; |
Tony Mak | 98b59f0 | 2019-08-07 11:50:58 +0100 | [diff] [blame] | 7270 | |
| 7271 | // Name of source package. |
| 7272 | optional string package_name = 8; |
Tony Mak | e2b1b67 | 2019-07-29 16:59:47 +0100 | [diff] [blame] | 7273 | } |
Tianjie Xu | 167c3db | 2019-07-22 14:25:14 -0700 | [diff] [blame] | 7274 | |
| 7275 | /** |
| 7276 | * Information about an OTA update attempt by update_engine. |
| 7277 | * Logged from platform/system/update_engine/metrics_reporter_android.cc |
| 7278 | */ |
| 7279 | message UpdateEngineUpdateAttemptReported { |
| 7280 | // The number of attempts for the update engine to apply a given payload. |
| 7281 | optional int32 attempt_number = 1; |
| 7282 | |
| 7283 | optional android.stats.otaupdate.PayloadType payload_type = 2; |
| 7284 | |
| 7285 | // The total time in minutes for the update engine to apply a given payload. |
| 7286 | // The time is calculated by calling clock_gettime() / CLOCK_BOOTTIME; and |
| 7287 | // it's increased when the system is sleeping. |
| 7288 | optional int32 duration_boottime_in_minutes = 3; |
| 7289 | |
| 7290 | // The total time in minutes for the update engine to apply a given payload. |
| 7291 | // The time is calculated by calling clock_gettime() / CLOCK_MONOTONIC_RAW; |
| 7292 | // and it's not increased when the system is sleeping. |
| 7293 | optional int32 duration_monotonic_in_minutes = 4; |
| 7294 | |
| 7295 | // The size of the payload in MiBs. |
| 7296 | optional int32 payload_size_mib = 5; |
| 7297 | |
| 7298 | // The attempt result reported by the update engine for an OTA update. |
| 7299 | optional android.stats.otaupdate.AttemptResult attempt_result = 6; |
| 7300 | |
| 7301 | // The error code reported by the update engine after an OTA update attempt |
| 7302 | // on A/B devices. |
| 7303 | optional android.stats.otaupdate.ErrorCode error_code = 7; |
| 7304 | |
| 7305 | // The build fingerprint of the source system. The value is read from a |
| 7306 | // system property when the device takes the update. e.g. |
| 7307 | // Android/aosp_sailfish/sailfish:10/QP1A.190425.004/5507117:userdebug/test-keys |
| 7308 | optional string source_fingerprint = 8; |
| 7309 | } |
| 7310 | |
| 7311 | /** |
| 7312 | * Information about all the attempts the device make before finishing the |
| 7313 | * successful update. |
| 7314 | * Logged from platform/system/update_engine/metrics_reporter_android.cc |
| 7315 | */ |
| 7316 | message UpdateEngineSuccessfulUpdateReported { |
| 7317 | // The number of attempts for the update engine to apply the payload for a |
| 7318 | // successful update. |
| 7319 | optional int32 attempt_count = 1; |
| 7320 | |
| 7321 | optional android.stats.otaupdate.PayloadType payload_type = 2; |
| 7322 | |
| 7323 | optional int32 payload_size_mib = 3; |
| 7324 | |
| 7325 | // The total number of bytes downloaded by update_engine since the last |
| 7326 | // successful update. |
| 7327 | optional int32 total_bytes_downloaded_mib = 4; |
| 7328 | |
| 7329 | // The ratio in percentage of the over-downloaded bytes compared to the |
| 7330 | // total bytes needed to successfully install the update. e.g. 200 if we |
| 7331 | // download 200MiB in total for a 100MiB package. |
| 7332 | optional int32 download_overhead_percentage = 5; |
| 7333 | |
| 7334 | // The total time in minutes for the update engine to apply the payload for a |
| 7335 | // successful update. |
| 7336 | optional int32 total_duration_minutes = 6; |
| 7337 | |
| 7338 | // The number of reboot of the device during a successful update. |
| 7339 | optional int32 reboot_count = 7; |
| 7340 | } |
Alec Mouri | e088e76 | 2019-07-02 13:10:55 -0700 | [diff] [blame] | 7341 | |
| 7342 | /** |
Kenny Root | 4eacaaa | 2020-01-08 20:48:13 -0800 | [diff] [blame] | 7343 | * Reported when the RebootEscrow HAL has attempted to recover the escrowed |
| 7344 | * key to indicate whether it was successful or not. |
| 7345 | * |
| 7346 | * Logged from: |
| 7347 | * frameworks/base/services/core/java/com/android/server/locksettings/RebootEscrowManager.java |
| 7348 | */ |
| 7349 | message RebootEscrowRecoveryReported { |
| 7350 | optional bool successful = 1; |
| 7351 | } |
| 7352 | |
| 7353 | /** |
Alec Mouri | e088e76 | 2019-07-02 13:10:55 -0700 | [diff] [blame] | 7354 | * Global display pipeline metrics reported by SurfaceFlinger. |
| 7355 | * Pulled from: |
| 7356 | * frameworks/native/services/surfaceflinger/TimeStats/TimeStats.cpp |
| 7357 | */ |
| 7358 | message SurfaceflingerStatsGlobalInfo { |
| 7359 | // Total number of frames presented during the tracing period |
| 7360 | optional int64 total_frames = 1; |
| 7361 | // Total number of frames missed |
| 7362 | optional int64 missed_frames = 2; |
| 7363 | // Total number of frames that fell back to client composition |
| 7364 | optional int64 client_composition_frames = 3; |
| 7365 | // Total time the display was turned on |
| 7366 | optional int64 display_on_millis = 4; |
| 7367 | // Total time that was spent performing animations. |
| 7368 | // This is derived from the present-to-present layer histogram |
| 7369 | optional int64 animation_millis = 5; |
| 7370 | } |
| 7371 | |
| 7372 | /** |
| 7373 | * Per-layer display pipeline metrics reported by SurfaceFlinger. |
| 7374 | * The number of layers uploaded will be restricted due to size limitations. |
| 7375 | * Pulled from: |
| 7376 | * frameworks/native/services/surfaceflinger/TimeStats/TimeStats.cpp |
| 7377 | */ |
| 7378 | message SurfaceflingerStatsLayerInfo { |
| 7379 | // The layer for this set of metrics |
| 7380 | // For now we can infer that the package name is included in the layer |
| 7381 | // name. |
| 7382 | optional string layer_name = 1; |
| 7383 | // Total number of frames presented |
| 7384 | optional int64 total_frames = 2; |
| 7385 | // Total number of dropped frames while latching a buffer for this layer. |
| 7386 | optional int64 dropped_frames = 3; |
| 7387 | // Set of timings measured between successive presentation timestamps. |
| 7388 | optional FrameTimingHistogram present_to_present = 4 |
| 7389 | [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 7390 | // Set of timings measured from when an app queued a buffer for |
| 7391 | // presentation, until the buffer was actually presented to the |
| 7392 | // display. |
| 7393 | optional FrameTimingHistogram post_to_present = 5 |
| 7394 | [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 7395 | // Set of timings measured from when a buffer is ready to be presented, |
| 7396 | // until the buffer was actually presented to the display. |
| 7397 | optional FrameTimingHistogram acquire_to_present = 6 |
| 7398 | [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 7399 | // Set of timings measured from when a buffer was latched by |
| 7400 | // SurfaceFlinger, until the buffer was presented to the display |
| 7401 | optional FrameTimingHistogram latch_to_present = 7 |
| 7402 | [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 7403 | // Set of timings measured from the desired presentation to the actual |
| 7404 | // presentation time |
| 7405 | optional FrameTimingHistogram desired_to_present = 8 |
| 7406 | [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 7407 | // Set of timings measured from when an app queued a buffer for |
| 7408 | // presentation, until the buffer was ready to be presented. |
| 7409 | optional FrameTimingHistogram post_to_acquire = 9 |
| 7410 | [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 7411 | } |
| 7412 | |
| 7413 | /** |
| 7414 | * Histogram of frame counts bucketed by time in milliseconds. |
| 7415 | * Because of size limitations, we hard-cap the number of buckets, with |
| 7416 | * buckets for corresponding to larger milliseconds being less precise. |
| 7417 | */ |
| 7418 | message FrameTimingHistogram { |
| 7419 | // Timings in milliseconds that describes a set of histogram buckets |
| 7420 | repeated int32 time_millis_buckets = 1; |
| 7421 | // Number of frames that match to each time_millis, i.e. the bucket |
| 7422 | // contents |
| 7423 | // It's required that len(time_millis) == len(frame_count) |
| 7424 | repeated int64 frame_counts = 2; |
| 7425 | } |
Emilian Peev | 6729f37 | 2019-08-29 09:14:09 -0700 | [diff] [blame] | 7426 | |
Emilian Peev | 6729f37 | 2019-08-29 09:14:09 -0700 | [diff] [blame] | 7427 | /** |
| 7428 | * Information about camera facing and API level usage. |
| 7429 | * Logged from: |
| 7430 | * frameworks/base/services/core/java/com/android/server/camera/CameraServiceProxy.java |
| 7431 | */ |
| 7432 | message CameraActionEvent { |
| 7433 | // Camera session duration |
| 7434 | optional int64 duration = 1; |
| 7435 | |
| 7436 | // Camera API level used |
| 7437 | optional int32 api_level = 2; |
| 7438 | |
| 7439 | // Name of client package |
| 7440 | optional string package_name = 3; |
| 7441 | |
| 7442 | // Camera facing |
| 7443 | enum Facing { |
| 7444 | UNKNOWN = 0; |
| 7445 | BACK = 1; |
| 7446 | FRONT = 2; |
| 7447 | EXTERNAL = 3; |
| 7448 | } |
| 7449 | optional Facing facing = 4; |
| 7450 | } |
atrost | 01a2093 | 2019-08-28 15:40:37 +0100 | [diff] [blame] | 7451 | |
| 7452 | /** |
| 7453 | * Logs when a compatibility change is affecting an app. |
| 7454 | * |
| 7455 | * Logged from: |
| 7456 | * frameworks/base/core/java/android/app/AppCompatCallbacks.java and |
| 7457 | * frameworks/base/services/core/java/com/android/server/compat/PlatformCompat.java |
| 7458 | */ |
| 7459 | message AppCompatibilityChangeReported { |
| 7460 | // The UID of the app being affected by the compatibilty change. |
| 7461 | optional int32 uid = 1 [(is_uid) = true]; |
| 7462 | |
| 7463 | // The ID of the change affecting the app. |
| 7464 | optional int64 change_id = 2; |
| 7465 | |
| 7466 | enum State { |
| 7467 | UNKNOWN_STATE = 0; |
| 7468 | ENABLED = 1; |
| 7469 | DISABLED = 2; |
| 7470 | LOGGED = 3; |
| 7471 | } |
| 7472 | |
| 7473 | // The state of the change - if logged from gating whether it was enabled or disabled, or just |
| 7474 | // logged otherwise. |
| 7475 | optional State state = 3; |
| 7476 | |
| 7477 | enum Source { |
| 7478 | UNKNOWN_SOURCE = 0; |
| 7479 | APP_PROCESS = 1; |
| 7480 | SYSTEM_SERVER = 2; |
| 7481 | } |
| 7482 | |
| 7483 | // Where it was logged from. |
| 7484 | optional Source source = 4; |
| 7485 | |
| 7486 | } |
Hector Dearman | 40579f6 | 2019-11-01 13:19:30 +0000 | [diff] [blame] | 7487 | |
| 7488 | /** |
| 7489 | * Logged from |
| 7490 | * external/perfetto/src/perfetto_cmd/perfetto_cmd.cc |
| 7491 | */ |
| 7492 | message PerfettoUploaded { |
| 7493 | enum Event { |
| 7494 | PERFETTO_UNDEFINED = 0; |
| 7495 | PERFETTO_TRACE_BEGIN = 1; |
| 7496 | PERFETTO_BACKGROUND_TRACE_BEGIN = 2; |
| 7497 | PERFETTO_ON_CONNECT = 3; |
| 7498 | PERFETTO_ON_TRACING_DISABLED = 4; |
| 7499 | PERFETTO_UPLOAD_DROPBOX_BEGIN = 5; |
| 7500 | PERFETTO_UPLOAD_DROPBOX_SUCCESS = 6; |
| 7501 | PERFETTO_UPLOAD_DROPBOX_FAILURE = 7; |
| 7502 | PERFETTO_UPLOAD_INCIDENT_BEGIN = 8; |
| 7503 | PERFETTO_UPLOAD_INCIDENT_SUCCESS = 9; |
| 7504 | PERFETTO_UPLOAD_INCIDENT_FAILURE = 10; |
| 7505 | PERFETTO_FINALIZE_TRACE_AND_EXIT = 11; |
| 7506 | PERFETTO_TRIGGER_BEGIN = 12; |
| 7507 | PERFETTO_TRIGGER_SUCCESS = 13; |
| 7508 | PERFETTO_TRIGGER_FAILURE = 14; |
| 7509 | PERFETTO_HIT_GUARDRAILS = 15; |
| 7510 | PERFETTO_ON_TIMEOUT = 16; |
| 7511 | PERFETTO_NOT_UPLOADING_EMPTY_TRACE = 17; |
| 7512 | } |
| 7513 | |
| 7514 | // Which stage of the pipeline we are reporting from. |
| 7515 | optional Event event = 1; |
| 7516 | |
| 7517 | // UUID matching the one set inside the SystemInfo trace packet. |
| 7518 | optional int64 trace_uuid_lsb = 2; |
| 7519 | optional int64 trace_uuid_msb = 3; |
| 7520 | } |
Mark Tabry | a824a64 | 2019-11-05 12:26:12 -0800 | [diff] [blame] | 7521 | |
| 7522 | /** |
| 7523 | * Pulls client metrics on data transferred via Vehicle Maps Service. |
| 7524 | * Metrics are keyed by uid + layer. |
| 7525 | * |
| 7526 | * Pulled from: |
| 7527 | * packages/services/Car/service/src/com/android/car/stats/CarStatsService.java |
| 7528 | */ |
| 7529 | message VmsClientStats { |
| 7530 | // UID of the VMS client app |
| 7531 | optional int32 uid = 1 [(is_uid) = true]; |
| 7532 | |
| 7533 | // VMS layer definition |
| 7534 | optional int32 layer_type = 2; |
| 7535 | optional int32 layer_channel = 3; |
| 7536 | optional int32 layer_version = 4; |
| 7537 | |
| 7538 | // Bytes and packets sent by the client for the layer |
| 7539 | optional int64 tx_bytes = 5; |
| 7540 | optional int64 tx_packets = 6; |
| 7541 | |
| 7542 | // Bytes and packets received by the client for the layer |
| 7543 | optional int64 rx_bytes = 7; |
| 7544 | optional int64 rx_packets = 8; |
| 7545 | |
| 7546 | // Bytes and packets dropped due to client error |
| 7547 | optional int64 dropped_bytes = 9; |
| 7548 | optional int64 dropped_packets = 10; |
| 7549 | } |
Stanislav Zholnin | ccb82e4 | 2019-11-29 18:59:49 +0000 | [diff] [blame] | 7550 | |
| 7551 | /** |
| 7552 | * State of a dangerous permission requested by a package - sampled |
| 7553 | * Pulled from: StatsCompanionService.java with data obtained from PackageManager API |
| 7554 | */ |
| 7555 | message DangerousPermissionStateSampled { |
| 7556 | // Name of the permission |
| 7557 | optional string permission_name = 1; |
| 7558 | |
| 7559 | // Uid of the package |
| 7560 | optional int32 uid = 2 [(is_uid) = true]; |
| 7561 | |
| 7562 | // If the permission is granted to the uid |
| 7563 | optional bool is_granted = 3; |
| 7564 | |
| 7565 | // Permission flags as per android.content.pm.PermissionFlags |
| 7566 | optional int32 permission_flags = 4; |
| 7567 | } |
| 7568 | |
Stan Iliev | 637ba5e | 2019-08-16 13:43:08 -0400 | [diff] [blame] | 7569 | /** |
| 7570 | * HWUI renders pipeline type: GL (0) or Vulkan (1). |
| 7571 | */ |
| 7572 | enum PipelineType { |
| 7573 | GL = 0; |
| 7574 | VULKAN = 1; |
| 7575 | } |
| 7576 | |
| 7577 | /** |
| 7578 | * HWUI stats for a given app. |
| 7579 | */ |
| 7580 | message GraphicsStats { |
| 7581 | // The package name of the app |
| 7582 | optional string package_name = 1; |
| 7583 | |
| 7584 | // The version code of the app |
| 7585 | optional int64 version_code = 2; |
| 7586 | |
| 7587 | // The start & end timestamps in UTC as |
| 7588 | // milliseconds since January 1, 1970 |
| 7589 | // Compatible with java.util.Date#setTime() |
| 7590 | optional int64 stats_start = 3; |
| 7591 | |
| 7592 | optional int64 stats_end = 4; |
| 7593 | |
| 7594 | // HWUI renders pipeline type: GL or Vulkan. |
| 7595 | optional PipelineType pipeline = 5; |
| 7596 | |
| 7597 | // Distinct frame count. |
| 7598 | optional int32 total_frames = 6; |
| 7599 | |
| 7600 | // Number of "missed vsync" events. |
| 7601 | optional int32 missed_vsync_count = 7; |
| 7602 | |
| 7603 | // Number of frames in triple-buffering scenario (high input latency) |
| 7604 | optional int32 high_input_latency_count = 8; |
| 7605 | |
| 7606 | // Number of "slow UI thread" events. |
| 7607 | optional int32 slow_ui_thread_count = 9; |
| 7608 | |
| 7609 | // Number of "slow bitmap upload" events. |
| 7610 | optional int32 slow_bitmap_upload_count = 10; |
| 7611 | |
| 7612 | // Number of "slow draw" events. |
| 7613 | optional int32 slow_draw_count = 11; |
| 7614 | |
| 7615 | // Number of frames that missed their deadline (aka, visibly janked) |
| 7616 | optional int32 missed_deadline_count = 12; |
| 7617 | |
| 7618 | // The frame time histogram for the package |
| 7619 | optional FrameTimingHistogram cpu_histogram = 13 |
| 7620 | [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 7621 | |
| 7622 | // The gpu frame time histogram for the package |
| 7623 | optional FrameTimingHistogram gpu_histogram = 14 |
| 7624 | [(android.os.statsd.log_mode) = MODE_BYTES]; |
| 7625 | |
| 7626 | // UI mainline module version. |
| 7627 | optional int64 version_ui_module = 15; |
| 7628 | |
| 7629 | // If true, these are HWUI stats for up to a 24h period for a given app from today. |
| 7630 | // If false, these are HWUI stats for a 24h period for a given app from the last complete |
| 7631 | // day (yesterday). Stats from yesterday stay constant, while stats from today may change as |
| 7632 | // more apps are running / rendering. |
| 7633 | optional bool is_today = 16; |
| 7634 | } |