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