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