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