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