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