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