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