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