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"; |
Tej Singh | 33a412b | 2018-03-16 18:43:59 -0700 | [diff] [blame] | 25 | import "frameworks/base/core/proto/android/app/job/enums.proto"; |
Tej Singh | 5d991e1 | 2018-03-09 19:48:11 -0800 | [diff] [blame] | 26 | import "frameworks/base/core/proto/android/bluetooth/enums.proto"; |
Bookatz | 1a1b046 | 2018-01-12 11:47:03 -0800 | [diff] [blame] | 27 | import "frameworks/base/core/proto/android/os/enums.proto"; |
Bookatz | 8bdae8d | 2018-01-16 11:24:30 -0800 | [diff] [blame] | 28 | import "frameworks/base/core/proto/android/server/enums.proto"; |
Tej Singh | c477d9c | 2018-02-05 18:31:39 -0800 | [diff] [blame] | 29 | import "frameworks/base/core/proto/android/telecomm/enums.proto"; |
Bookatz | 1a1b046 | 2018-01-12 11:47:03 -0800 | [diff] [blame] | 30 | import "frameworks/base/core/proto/android/telephony/enums.proto"; |
| 31 | import "frameworks/base/core/proto/android/view/enums.proto"; |
Howard Ro | 0546d54 | 2018-08-30 16:23:44 -0700 | [diff] [blame] | 32 | import "frameworks/base/proto/src/stats_enums.proto"; |
Chenjie Yu | 159e4f8 | 2018-08-29 11:49:11 -0700 | [diff] [blame] | 33 | import "frameworks/base/core/proto/android/service/procstats.proto"; |
Joe Onorato | 62c220b | 2017-11-18 20:32:56 -0800 | [diff] [blame] | 34 | |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 35 | /** |
Stefan Lafon | ae2df01 | 2017-11-14 09:17:21 -0800 | [diff] [blame] | 36 | * The master atom class. This message defines all of the available |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 37 | * raw stats log events from the Android system, also known as "atoms." |
| 38 | * |
| 39 | * This field contains a single oneof with all of the available messages. |
| 40 | * The stats-log-api-gen tool runs as part of the Android build and |
| 41 | * generates the android.util.StatsLog class, which contains the constants |
| 42 | * and methods that Android uses to log. |
| 43 | * |
Stefan Lafon | ae2df01 | 2017-11-14 09:17:21 -0800 | [diff] [blame] | 44 | * This Atom class is not actually built into the Android system. |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 45 | * Instead, statsd on Android constructs these messages synthetically, |
| 46 | * in the format defined here and in stats_log.proto. |
| 47 | */ |
Stefan Lafon | ae2df01 | 2017-11-14 09:17:21 -0800 | [diff] [blame] | 48 | message Atom { |
| 49 | // Pushed atoms start at 2. |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 50 | oneof pushed { |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 51 | // For StatsLog reasons, 1 is illegal and will not work. Must start at 2. |
| 52 | BleScanStateChanged ble_scan_state_changed = 2; |
Chenjie Yu | bd1a28f | 2018-07-17 14:55:19 -0700 | [diff] [blame] | 53 | ProcessStateChanged process_state_changed = 3; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 54 | BleScanResultReceived ble_scan_result_received = 4; |
| 55 | SensorStateChanged sensor_state_changed = 5; |
Bookatz | db026a2 | 2018-01-10 19:01:56 -0800 | [diff] [blame] | 56 | GpsScanStateChanged gps_scan_state_changed = 6; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 57 | SyncStateChanged sync_state_changed = 7; |
| 58 | ScheduledJobStateChanged scheduled_job_state_changed = 8; |
| 59 | ScreenBrightnessChanged screen_brightness_changed = 9; |
Bookatz | d674624 | 2017-10-24 18:39:35 -0700 | [diff] [blame] | 60 | WakelockStateChanged wakelock_state_changed = 10; |
Bookatz | ddccf0a | 2017-11-28 16:48:14 -0800 | [diff] [blame] | 61 | LongPartialWakelockStateChanged long_partial_wakelock_state_changed = 11; |
| 62 | MobileRadioPowerStateChanged mobile_radio_power_state_changed = 12; |
| 63 | WifiRadioPowerStateChanged wifi_radio_power_state_changed = 13; |
Chenjie Yu | bd1a28f | 2018-07-17 14:55:19 -0700 | [diff] [blame] | 64 | ActivityManagerSleepStateChanged activity_manager_sleep_state_changed = 14; |
| 65 | MemoryFactorStateChanged memory_factor_state_changed = 15; |
| 66 | ExcessiveCpuUsageReported excessive_cpu_usage_reported = 16; |
| 67 | CachedKillReported cached_kill_reported = 17; |
| 68 | ProcessMemoryStatReported process_memory_stat_reported = 18; |
| 69 | // 19 is available |
Bookatz | ddccf0a | 2017-11-28 16:48:14 -0800 | [diff] [blame] | 70 | BatterySaverModeStateChanged battery_saver_mode_state_changed = 20; |
| 71 | DeviceIdleModeStateChanged device_idle_mode_state_changed = 21; |
| 72 | DeviceIdlingModeStateChanged device_idling_mode_state_changed = 22; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 73 | AudioStateChanged audio_state_changed = 23; |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 74 | MediaCodecStateChanged media_codec_state_changed = 24; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 75 | CameraStateChanged camera_state_changed = 25; |
| 76 | FlashlightStateChanged flashlight_state_changed = 26; |
| 77 | UidProcessStateChanged uid_process_state_changed = 27; |
| 78 | ProcessLifeCycleStateChanged process_life_cycle_state_changed = 28; |
| 79 | ScreenStateChanged screen_state_changed = 29; |
Bookatz | 8c6571b | 2017-10-24 15:04:41 -0700 | [diff] [blame] | 80 | BatteryLevelChanged battery_level_changed = 30; |
| 81 | ChargingStateChanged charging_state_changed = 31; |
| 82 | PluggedStateChanged plugged_state_changed = 32; |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 83 | // 33 - 34 are available |
Bookatz | 8c6571b | 2017-10-24 15:04:41 -0700 | [diff] [blame] | 84 | WakeupAlarmOccurred wakeup_alarm_occurred = 35; |
| 85 | KernelWakeupReported kernel_wakeup_reported = 36; |
Bookatz | e588524 | 2017-10-24 20:10:31 -0700 | [diff] [blame] | 86 | WifiLockStateChanged wifi_lock_state_changed = 37; |
| 87 | WifiSignalStrengthChanged wifi_signal_strength_changed = 38; |
| 88 | WifiScanStateChanged wifi_scan_state_changed = 39; |
| 89 | PhoneSignalStrengthChanged phone_signal_strength_changed = 40; |
David Chen | c28b2bb | 2017-10-24 12:52:52 -0700 | [diff] [blame] | 90 | SettingChanged setting_changed = 41; |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 91 | ActivityForegroundStateChanged activity_foreground_state_changed = 42; |
David Chen | 2158296 | 2017-11-01 17:32:46 -0700 | [diff] [blame] | 92 | IsolatedUidChanged isolated_uid_changed = 43; |
Hugo Benichi | 884970e | 2017-11-14 22:42:46 +0900 | [diff] [blame] | 93 | PacketWakeupOccurred packet_wakeup_occurred = 44; |
Bookatz | 7948c87 | 2018-09-04 12:58:33 -0700 | [diff] [blame] | 94 | WallClockTimeShifted wall_clock_time_shifted = 45; |
Bookatz | 8fcd09a | 2017-12-18 13:01:10 -0800 | [diff] [blame] | 95 | AnomalyDetected anomaly_detected = 46; |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 96 | AppBreadcrumbReported app_breadcrumb_reported = 47; |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 97 | AppStartOccurred app_start_occurred = 48; |
| 98 | AppStartCanceled app_start_canceled = 49; |
| 99 | AppStartFullyDrawn app_start_fully_drawn = 50; |
Rajeev Kumar | 8a9fa05 | 2018-01-25 19:03:09 -0800 | [diff] [blame] | 100 | LmkKillOccurred lmk_kill_occurred = 51; |
Chenjie Yu | 52cacc6 | 2017-12-08 18:11:45 -0800 | [diff] [blame] | 101 | PictureInPictureStateChanged picture_in_picture_state_changed = 52; |
Tej Singh | 4503e10 | 2018-01-04 14:35:01 -0800 | [diff] [blame] | 102 | WifiMulticastLockStateChanged wifi_multicast_lock_state_changed = 53; |
Rajeev Kumar | 8a9fa05 | 2018-01-25 19:03:09 -0800 | [diff] [blame] | 103 | LmkStateChanged lmk_state_changed = 54; |
| 104 | AppStartMemoryStateCaptured app_start_memory_state_captured = 55; |
Tej Singh | 1ea4289 | 2018-01-19 09:27:00 -0800 | [diff] [blame] | 105 | ShutdownSequenceReported shutdown_sequence_reported = 56; |
Tej Singh | 6483ea4 | 2018-01-25 17:45:49 -0800 | [diff] [blame] | 106 | BootSequenceReported boot_sequence_reported = 57; |
Tej Singh | bb8554a | 2018-01-26 11:59:14 -0800 | [diff] [blame] | 107 | DaveyOccurred davey_occurred = 58; |
Chenjie Yu | e890419 | 2017-12-08 19:12:57 -0800 | [diff] [blame] | 108 | OverlayStateChanged overlay_state_changed = 59; |
Chenjie Yu | ccfe645 | 2018-01-30 11:33:21 -0800 | [diff] [blame] | 109 | ForegroundServiceStateChanged foreground_service_state_changed = 60; |
Tej Singh | c477d9c | 2018-02-05 18:31:39 -0800 | [diff] [blame] | 110 | CallStateChanged call_state_changed = 61; |
Tej Singh | dd7bd35 | 2018-02-09 19:33:15 -0800 | [diff] [blame] | 111 | KeyguardStateChanged keyguard_state_changed = 62; |
| 112 | KeyguardBouncerStateChanged keyguard_bouncer_state_changed = 63; |
| 113 | KeyguardBouncerPasswordEntered keyguard_bouncer_password_entered = 64; |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 114 | AppDied app_died = 65; |
Tej Singh | a883b37 | 2018-02-15 11:30:01 -0800 | [diff] [blame] | 115 | ResourceConfigurationChanged resource_configuration_changed = 66; |
Tej Singh | 5d991e1 | 2018-03-09 19:48:11 -0800 | [diff] [blame] | 116 | BluetoothEnabledStateChanged bluetooth_enabled_state_changed = 67; |
| 117 | BluetoothConnectionStateChanged bluetooth_connection_state_changed = 68; |
Tej Singh | 02200f9 | 2018-04-02 19:37:59 -0700 | [diff] [blame] | 118 | // 69 is blank but need not be. |
Andrew Chant | b56388b | 2018-03-22 21:07:33 -0700 | [diff] [blame] | 119 | UsbConnectorStateChanged usb_connector_state_changed = 70; |
Andrew Chant | 28d627e | 2018-02-22 15:17:05 -0800 | [diff] [blame] | 120 | SpeakerImpedanceReported speaker_impedance_reported = 71; |
| 121 | HardwareFailed hardware_failed = 72; |
| 122 | PhysicalDropDetected physical_drop_detected = 73; |
| 123 | ChargeCyclesReported charge_cycles_reported = 74; |
Tej Singh | eee317b | 2018-03-07 19:28:05 -0800 | [diff] [blame] | 124 | MobileConnectionStateChanged mobile_connection_state_changed = 75; |
| 125 | MobileRadioTechnologyChanged mobile_radio_technology_changed = 76; |
Andrew Chant | b56388b | 2018-03-22 21:07:33 -0700 | [diff] [blame] | 126 | UsbDeviceAttached usb_device_attached = 77; |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 127 | AppCrashOccurred app_crash_occurred = 78; |
| 128 | ANROccurred anr_occurred = 79; |
| 129 | WTFOccurred wtf_occurred = 80; |
| 130 | LowMemReported low_mem_reported = 81; |
Howard Ro | cb767f6 | 2018-06-19 19:58:05 -0700 | [diff] [blame] | 131 | GenericAtom generic_atom = 82; |
Yangster-mac | 48b3d62 | 2018-08-18 12:38:11 -0700 | [diff] [blame] | 132 | KeyValuePairsAtom key_value_pairs_atom = 83; |
Bookatz | a7020bd | 2018-08-28 16:29:35 -0700 | [diff] [blame] | 133 | VibratorStateChanged vibrator_state_changed = 84; |
Yangster-mac | 9635300 | 2018-09-05 11:18:55 -0700 | [diff] [blame] | 134 | DeferredJobStatsReported deferred_job_stats_reported = 85; |
Yangster-mac | e16189a | 2018-08-26 12:20:16 -0700 | [diff] [blame] | 135 | ThermalThrottlingStateChanged thermal_throttling = 86; |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 136 | FingerprintAcquired fingerprint_acquired = 87; |
| 137 | FingerprintAuthenticated fingerprint_authenticated = 88; |
| 138 | FingerprintErrorOccurred fingerprint_error_occurred = 89; |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 139 | } |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 140 | |
David Chen | 6e3e6cb | 2018-01-03 16:14:06 -0800 | [diff] [blame] | 141 | // Pulled events will start at field 10000. |
Marcin Oczeretko | d8cc859 | 2018-08-22 16:07:36 +0100 | [diff] [blame] | 142 | // Next: 10025 |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 143 | oneof pulled { |
David Chen | 6e3e6cb | 2018-01-03 16:14:06 -0800 | [diff] [blame] | 144 | WifiBytesTransfer wifi_bytes_transfer = 10000; |
| 145 | WifiBytesTransferByFgBg wifi_bytes_transfer_by_fg_bg = 10001; |
| 146 | MobileBytesTransfer mobile_bytes_transfer = 10002; |
| 147 | MobileBytesTransferByFgBg mobile_bytes_transfer_by_fg_bg = 10003; |
Chenjie Yu | 9d7720b | 2018-01-24 10:34:48 -0800 | [diff] [blame] | 148 | BluetoothBytesTransfer bluetooth_bytes_transfer = 10006; |
David Chen | 6e3e6cb | 2018-01-03 16:14:06 -0800 | [diff] [blame] | 149 | KernelWakelock kernel_wakelock = 10004; |
Chenjie Yu | c8b7f22 | 2018-01-11 23:25:57 -0800 | [diff] [blame] | 150 | SubsystemSleepState subsystem_sleep_state = 10005; |
David Chen | 6e3e6cb | 2018-01-03 16:14:06 -0800 | [diff] [blame] | 151 | CpuTimePerFreq cpu_time_per_freq = 10008; |
| 152 | CpuTimePerUid cpu_time_per_uid = 10009; |
| 153 | CpuTimePerUidFreq cpu_time_per_uid_freq = 10010; |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 154 | WifiActivityInfo wifi_activity_info = 10011; |
David Chen | 6e3e6cb | 2018-01-03 16:14:06 -0800 | [diff] [blame] | 155 | ModemActivityInfo modem_activity_info = 10012; |
Chenjie Yu | 9d7720b | 2018-01-24 10:34:48 -0800 | [diff] [blame] | 156 | BluetoothActivityInfo bluetooth_activity_info = 10007; |
Rajeev Kumar | 8a9fa05 | 2018-01-25 19:03:09 -0800 | [diff] [blame] | 157 | ProcessMemoryState process_memory_state = 10013; |
Chenjie Yu | 9d7720b | 2018-01-24 10:34:48 -0800 | [diff] [blame] | 158 | SystemElapsedRealtime system_elapsed_realtime = 10014; |
| 159 | SystemUptime system_uptime = 10015; |
Chenjie Yu | 9da105b | 2018-01-13 12:41:08 -0800 | [diff] [blame] | 160 | CpuActiveTime cpu_active_time = 10016; |
| 161 | CpuClusterTime cpu_cluster_time = 10017; |
Tej Singh | 86dc9db | 2018-09-06 00:39:57 +0000 | [diff] [blame] | 162 | DiskSpace disk_space = 10018 [deprecated=true]; |
Tej Singh | bf972d9 | 2018-01-10 20:51:13 -0800 | [diff] [blame] | 163 | RemainingBatteryCapacity remaining_battery_capacity = 10019; |
| 164 | FullBatteryCapacity full_battery_capacity = 10020; |
Tej Singh | 4029831 | 2018-02-16 00:15:09 -0800 | [diff] [blame] | 165 | Temperature temperature = 10021; |
Olivier Gaillard | 00bfb1b | 2018-07-10 11:25:09 +0100 | [diff] [blame] | 166 | BinderCalls binder_calls = 10022; |
Olivier Gaillard | 9ea238d | 2018-07-24 10:26:31 +0100 | [diff] [blame] | 167 | BinderCallsExceptions binder_calls_exceptions = 10023; |
Marcin Oczeretko | d8cc859 | 2018-08-22 16:07:36 +0100 | [diff] [blame] | 168 | LooperStats looper_stats = 10024; |
Tej Singh | 86dc9db | 2018-09-06 00:39:57 +0000 | [diff] [blame] | 169 | DiskStats disk_stats = 10025; |
| 170 | DirectoryUsage directory_usage = 10026; |
| 171 | AppSize app_size = 10027; |
| 172 | CategorySize category_size = 10028; |
Bookatz | 17f0d8a | 2018-09-13 12:56:32 -0700 | [diff] [blame] | 173 | BatteryVoltage battery_voltage = 10030; |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 174 | NumFingerprints num_fingerprints = 10031; |
Chenjie Yu | 12e5e67 | 2018-09-14 15:54:59 -0700 | [diff] [blame] | 175 | ProcStats proc_stats = 10029; |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 176 | } |
yro | a1fe77c | 2018-02-26 14:22:54 -0800 | [diff] [blame] | 177 | |
Bookatz | 76aafcf | 2018-09-17 16:17:10 -0700 | [diff] [blame] | 178 | // DO NOT USE field numbers above 100,000 in AOSP. |
| 179 | // Field numbers 100,000 - 199,999 are reserved for non-AOSP (e.g. OEMs) to use. |
| 180 | // 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] | 181 | } |
| 182 | |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 183 | /** |
Yangster-mac | 2087716 | 2017-12-22 17:19:39 -0800 | [diff] [blame] | 184 | * This proto represents a node of an attribution chain. |
| 185 | * Note: All attribution chains are represented as a repeated field of type |
| 186 | * AttributionNode. It is understood that in such arrays, the order is that |
| 187 | * 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] | 188 | */ |
Yangster-mac | 2087716 | 2017-12-22 17:19:39 -0800 | [diff] [blame] | 189 | message AttributionNode { |
| 190 | // The uid for a given element in the attribution chain. |
Yangster-mac | 7604aea | 2017-12-11 22:55:49 -0800 | [diff] [blame] | 191 | optional int32 uid = 1; |
Yangster-mac | 7604aea | 2017-12-11 22:55:49 -0800 | [diff] [blame] | 192 | |
Yangster-mac | 2087716 | 2017-12-22 17:19:39 -0800 | [diff] [blame] | 193 | // The (optional) string tag for an element in the attribution chain. If the |
| 194 | // element has no tag, it is encoded as an empty string. |
| 195 | optional string tag = 2; |
Stefan Lafon | cdb1a0e | 2017-09-27 20:24:15 -0700 | [diff] [blame] | 196 | } |
| 197 | |
Yangster-mac | 48b3d62 | 2018-08-18 12:38:11 -0700 | [diff] [blame] | 198 | message KeyValuePair { |
| 199 | optional int32 key = 1; |
| 200 | oneof value { |
| 201 | int64 value_int = 2; |
| 202 | string value_str = 3; |
| 203 | float value_float = 4; |
| 204 | } |
| 205 | } |
| 206 | |
| 207 | message KeyValuePairsAtom { |
| 208 | optional int32 uid = 1; |
| 209 | repeated KeyValuePair pairs = 2; |
| 210 | } |
| 211 | |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 212 | /* |
| 213 | * ***************************************************************************** |
yro | de4ca10 | 2017-11-15 22:57:24 -0800 | [diff] [blame] | 214 | * 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] | 215 | * |
| 216 | * RULES: |
| 217 | * - The field ids for each atom must start at 1, and count upwards by 1. |
| 218 | * Skipping field ids is not allowed. |
| 219 | * - These form an API, so renaming, renumbering or removing fields is |
| 220 | * not allowed between android releases. (This is not currently enforced, |
| 221 | * but there will be a tool to enforce this restriction). |
| 222 | * - The types must be built-in protocol buffer types, namely, no sub-messages |
| 223 | * are allowed (yet). The bytes type is also not allowed. |
| 224 | * - The CamelCase name of the message type should match the |
Stefan Lafon | ae2df01 | 2017-11-14 09:17:21 -0800 | [diff] [blame] | 225 | * underscore_separated name as defined in Atom. |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 226 | * - 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] | 227 | * be exactly one AttributionChain field. It must be field number 1. |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 228 | * - A field that is a uid should be a string field, tagged with the [xxx] |
| 229 | * annotation. The generated code on android will be represented by UIDs, |
| 230 | * and those UIDs will be translated in xxx to those strings. |
| 231 | * |
| 232 | * CONVENTIONS: |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 233 | * - Events are past tense. e.g. ScreenStateChanged, not ScreenStateChange. |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 234 | * - If there is a UID, it goes first. Think in an object-oriented fashion. |
| 235 | * ***************************************************************************** |
| 236 | */ |
Stefan Lafon | cdb1a0e | 2017-09-27 20:24:15 -0700 | [diff] [blame] | 237 | |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 238 | /** |
Yangster-mac | e16189a | 2018-08-26 12:20:16 -0700 | [diff] [blame] | 239 | * Logs when the Thermal service HAL notifies the throttling start/stop events. |
| 240 | * |
| 241 | * Logged from: |
| 242 | * frameworks/base/services/core/java/com/android/server/stats/StatsCompanionService.java |
| 243 | */ |
| 244 | message ThermalThrottlingStateChanged { |
| 245 | optional android.os.TemperatureTypeEnum sensor_type = 1; |
| 246 | |
| 247 | enum State { |
| 248 | UNKNOWN = 0; |
| 249 | START = 1; |
| 250 | STOP = 2; |
| 251 | } |
| 252 | |
| 253 | optional State state = 2; |
| 254 | |
| 255 | optional float temperature = 3; |
| 256 | } |
| 257 | |
| 258 | /** |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 259 | * Logs when the screen state changes. |
| 260 | * |
| 261 | * Logged from: |
| 262 | * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java |
| 263 | */ |
| 264 | message ScreenStateChanged { |
Bookatz | 1a1b046 | 2018-01-12 11:47:03 -0800 | [diff] [blame] | 265 | // New screen state, from frameworks/base/core/proto/android/view/enums.proto. |
Yao Chen | 9c1debe | 2018-02-19 14:39:19 -0800 | [diff] [blame] | 266 | optional android.view.DisplayStateEnum state = 1 [(stateFieldOption).option = EXCLUSIVE]; |
Stefan Lafon | cdb1a0e | 2017-09-27 20:24:15 -0700 | [diff] [blame] | 267 | } |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 268 | |
| 269 | /** |
Chenjie Yu | bd1a28f | 2018-07-17 14:55:19 -0700 | [diff] [blame] | 270 | * Logs that the process state of the uid, as determined by ActivityManager |
| 271 | * (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] | 272 | * |
| 273 | * Logged from: |
| 274 | * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java |
| 275 | */ |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 276 | message UidProcessStateChanged { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 277 | optional int32 uid = 1 [(stateFieldOption).option = PRIMARY, (is_uid) = true]; |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 278 | |
Bookatz | db026a2 | 2018-01-10 19:01:56 -0800 | [diff] [blame] | 279 | // The state, from frameworks/base/core/proto/android/app/enums.proto. |
Yao Chen | 9c1debe | 2018-02-19 14:39:19 -0800 | [diff] [blame] | 280 | optional android.app.ProcessStateEnum state = 2 [(stateFieldOption).option = EXCLUSIVE]; |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 281 | } |
| 282 | |
| 283 | /** |
Chenjie Yu | bd1a28f | 2018-07-17 14:55:19 -0700 | [diff] [blame] | 284 | * Logs process state change of a process, as per the activity manager. |
| 285 | * |
| 286 | * Logged from: |
| 287 | * frameworks/base/services/core/java/com/android/server/am/ProcessRecord.java |
| 288 | */ |
| 289 | message ProcessStateChanged { |
| 290 | optional int32 uid = 1; |
| 291 | optional string process_name = 2; |
| 292 | optional string package_name = 3; |
| 293 | // TODO: remove this when validation is done |
| 294 | optional int64 version = 5; |
| 295 | // The state, from frameworks/base/core/proto/android/app/enums.proto. |
| 296 | optional android.app.ProcessStateEnum state = 4; |
| 297 | } |
| 298 | |
| 299 | /** |
| 300 | * Logs when ActivityManagerService sleep state is changed. |
| 301 | * |
| 302 | * Logged from: |
| 303 | * frameworks/base/services/core/java/com/android/server/am/ActivityTaskManagerService.java |
| 304 | */ |
| 305 | message ActivityManagerSleepStateChanged { |
| 306 | // TODO: import frameworks proto |
| 307 | enum State { |
| 308 | UNKNOWN = 0; |
| 309 | ASLEEP = 1; |
| 310 | AWAKE = 2; |
| 311 | } |
| 312 | optional State state = 1 [(stateFieldOption).option = EXCLUSIVE]; |
| 313 | } |
| 314 | |
| 315 | /** |
| 316 | * Logs when system memory state changes. |
| 317 | * |
| 318 | * Logged from: |
| 319 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
| 320 | */ |
| 321 | message MemoryFactorStateChanged { |
| 322 | // TODO: import frameworks proto |
| 323 | enum State { |
| 324 | MEMORY_UNKNOWN = 0; |
| 325 | NORMAL = 1; // normal. |
| 326 | MODERATE = 2; // moderate memory pressure. |
| 327 | LOW = 3; // low memory. |
| 328 | CRITICAL = 4; // critical memory. |
| 329 | |
| 330 | } |
| 331 | optional State factor = 1 [(stateFieldOption).option = EXCLUSIVE]; |
| 332 | } |
| 333 | |
| 334 | /** |
| 335 | * Logs when app is using too much cpu, according to ActivityManagerService. |
| 336 | * |
| 337 | * Logged from: |
| 338 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
| 339 | */ |
| 340 | message ExcessiveCpuUsageReported { |
| 341 | optional int32 uid = 1; |
| 342 | optional string process_name = 2; |
| 343 | optional string package_name = 3; |
| 344 | // package version. TODO: remove this when validation is done |
| 345 | optional int64 version = 4; |
| 346 | } |
| 347 | |
| 348 | /** |
| 349 | * Logs when a cached process is killed, along with its pss. |
| 350 | * |
| 351 | * Logged from: |
| 352 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
| 353 | */ |
| 354 | message CachedKillReported { |
| 355 | optional int32 uid = 1; |
| 356 | optional string process_name = 2; |
| 357 | optional string package_name = 3; |
| 358 | // TODO: remove this when validation is done |
| 359 | optional int64 version = 5; |
| 360 | optional int64 pss = 4; |
| 361 | } |
| 362 | |
| 363 | /** |
| 364 | * Logs when memory stats of a process is reported. |
| 365 | * |
| 366 | * Logged from: |
| 367 | * frameworks/base/services/core/java/com/android/server/am/ProcessRecord.java |
| 368 | */ |
| 369 | message ProcessMemoryStatReported { |
| 370 | optional int32 uid = 1; |
| 371 | optional string process_name = 2; |
| 372 | optional string package_name = 3; |
| 373 | //TODO: remove this when validation is done |
| 374 | optional int64 version = 9; |
| 375 | optional int64 pss = 4; |
| 376 | optional int64 uss = 5; |
| 377 | optional int64 rss = 6; |
| 378 | enum Type { |
| 379 | ADD_PSS_INTERNAL_SINGLE = 0; |
| 380 | ADD_PSS_INTERNAL_ALL_MEM = 1; |
| 381 | ADD_PSS_INTERNAL_ALL_POLL = 2; |
| 382 | ADD_PSS_EXTERNAL = 3; |
| 383 | ADD_PSS_EXTERNAL_SLOW = 4; |
| 384 | } |
| 385 | optional Type type = 7; |
| 386 | optional int64 duration = 8; |
| 387 | } |
| 388 | |
| 389 | /** |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 390 | * Logs that a process started, finished, crashed, or ANRed. |
| 391 | * |
| 392 | * Logged from: |
| 393 | * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java |
| 394 | */ |
| 395 | message ProcessLifeCycleStateChanged { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 396 | optional int32 uid = 1 [(is_uid) = true]; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 397 | |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 398 | // The process name (usually same as the app name). |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 399 | optional string process_name = 2; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 400 | |
Bookatz | ddccf0a | 2017-11-28 16:48:14 -0800 | [diff] [blame] | 401 | // What lifecycle state the process changed to. |
| 402 | // This enum is specific to atoms.proto. |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 403 | enum State { |
| 404 | FINISHED = 0; |
| 405 | STARTED = 1; |
| 406 | CRASHED = 2; |
Bookatz | ddccf0a | 2017-11-28 16:48:14 -0800 | [diff] [blame] | 407 | } |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 408 | optional State state = 3; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 409 | } |
| 410 | |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 411 | /** |
| 412 | * Logs when the ble scan state changes. |
| 413 | * |
| 414 | * Logged from: |
Bookatz | 17a879d | 2018-03-28 15:05:28 -0700 | [diff] [blame] | 415 | * packages/apps/Bluetooth/src/com/android/bluetooth/gatt/AppScanStats.java |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 416 | */ |
| 417 | message BleScanStateChanged { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 418 | repeated AttributionNode attribution_node = 1; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 419 | |
| 420 | enum State { |
| 421 | OFF = 0; |
| 422 | ON = 1; |
Bookatz | e5ec0b4 | 2018-03-26 13:34:56 -0700 | [diff] [blame] | 423 | // RESET indicates all ble stopped. Used when it (re)starts (e.g. after it crashes). |
| 424 | RESET = 2; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 425 | } |
| 426 | optional State state = 2; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 427 | |
Bookatz | e5ec0b4 | 2018-03-26 13:34:56 -0700 | [diff] [blame] | 428 | // Does the scan have a filter. |
| 429 | optional bool is_filtered = 3; |
| 430 | // Whether the scan is a CALLBACK_TYPE_FIRST_MATCH scan. Called 'background' scan internally. |
| 431 | optional bool is_first_match = 4; |
| 432 | // Whether the scan set to piggy-back off the results of other scans (SCAN_MODE_OPPORTUNISTIC). |
| 433 | optional bool is_opportunistic = 5; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 434 | } |
| 435 | |
| 436 | /** |
| 437 | * Logs reporting of a ble scan finding results. |
| 438 | * |
| 439 | * Logged from: |
Bookatz | ae6738e | 2018-09-13 11:38:56 -0700 | [diff] [blame] | 440 | * packages/apps/Bluetooth/src/com/android/bluetooth/gatt/AppScanStats.java |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 441 | */ |
Bookatz | ae6738e | 2018-09-13 11:38:56 -0700 | [diff] [blame] | 442 | // TODO: Consider also tracking per-scanner-id. |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 443 | message BleScanResultReceived { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 444 | repeated AttributionNode attribution_node = 1; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 445 | |
| 446 | // Number of ble scan results returned. |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 447 | optional int32 num_results = 2; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 448 | } |
| 449 | |
| 450 | /** |
| 451 | * Logs when a sensor state changes. |
| 452 | * |
| 453 | * Logged from: |
Bookatz | 235343d | 2018-03-26 13:03:50 -0700 | [diff] [blame] | 454 | * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 455 | */ |
| 456 | message SensorStateChanged { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 457 | repeated AttributionNode attribution_node = 1; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 458 | |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 459 | // The id (int) of the sensor. |
| 460 | optional int32 sensor_id = 2; |
| 461 | |
| 462 | enum State { |
| 463 | OFF = 0; |
| 464 | ON = 1; |
| 465 | } |
| 466 | optional State state = 3; |
| 467 | } |
| 468 | |
| 469 | |
| 470 | /** |
| 471 | * Logs when GPS state changes. |
| 472 | * |
| 473 | * Logged from: |
| 474 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
| 475 | */ |
| 476 | message GpsScanStateChanged { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 477 | repeated AttributionNode attribution_node = 1; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 478 | |
| 479 | enum State { |
| 480 | OFF = 0; |
| 481 | ON = 1; |
| 482 | } |
| 483 | optional State state = 2; |
| 484 | } |
| 485 | |
| 486 | |
| 487 | /** |
| 488 | * Logs when a sync manager sync state changes. |
| 489 | * |
| 490 | * Logged from: |
Bookatz | 235343d | 2018-03-26 13:03:50 -0700 | [diff] [blame] | 491 | * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 492 | */ |
| 493 | message SyncStateChanged { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 494 | repeated AttributionNode attribution_node = 1; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 495 | |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 496 | // 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] | 497 | optional string sync_name = 2; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 498 | |
| 499 | enum State { |
| 500 | OFF = 0; |
| 501 | ON = 1; |
| 502 | } |
| 503 | optional State state = 3; |
| 504 | } |
| 505 | |
Yangster-mac | 9635300 | 2018-09-05 11:18:55 -0700 | [diff] [blame] | 506 | /* |
| 507 | * Deferred job stats. |
| 508 | * |
| 509 | * Logged from: |
| 510 | * frameworks/base/services/core/java/com/android/server/job/JobSchedulerService.java |
| 511 | */ |
| 512 | message DeferredJobStatsReported { |
| 513 | repeated AttributionNode attribution_node = 1; |
| 514 | |
| 515 | // Number of jobs deferred. |
| 516 | optional int32 num_jobs_deferred = 2; |
| 517 | |
| 518 | // Time since the last job runs. |
| 519 | optional int64 time_since_last_job_millis = 3; |
| 520 | } |
| 521 | |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 522 | /** |
| 523 | * Logs when a job scheduler job state changes. |
| 524 | * |
| 525 | * Logged from: |
Bookatz | 235343d | 2018-03-26 13:03:50 -0700 | [diff] [blame] | 526 | * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 527 | */ |
| 528 | message ScheduledJobStateChanged { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 529 | repeated AttributionNode attribution_node = 1; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 530 | |
| 531 | // Name of the job (as named in the app) |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 532 | optional string job_name = 2; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 533 | |
| 534 | enum State { |
Tej Singh | d5747a6 | 2018-01-08 20:57:35 -0800 | [diff] [blame] | 535 | FINISHED = 0; |
| 536 | STARTED = 1; |
| 537 | SCHEDULED = 2; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 538 | } |
| 539 | optional State state = 3; |
| 540 | |
Tej Singh | 33a412b | 2018-03-16 18:43:59 -0700 | [diff] [blame] | 541 | // The reason a job has stopped. |
| 542 | // This is only applicable when the state is FINISHED. |
Bookatz | 235343d | 2018-03-26 13:03:50 -0700 | [diff] [blame] | 543 | // The default value is STOP_REASON_UNKNOWN. |
Tej Singh | 33a412b | 2018-03-16 18:43:59 -0700 | [diff] [blame] | 544 | optional android.app.job.StopReasonEnum stop_reason = 4; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 545 | } |
| 546 | |
| 547 | /** |
| 548 | * Logs when the audio state changes. |
| 549 | * |
| 550 | * Logged from: |
Bookatz | 235343d | 2018-03-26 13:03:50 -0700 | [diff] [blame] | 551 | * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 552 | */ |
| 553 | message AudioStateChanged { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 554 | repeated AttributionNode attribution_node = 1; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 555 | |
| 556 | enum State { |
| 557 | OFF = 0; |
| 558 | ON = 1; |
Bookatz | 235343d | 2018-03-26 13:03:50 -0700 | [diff] [blame] | 559 | // RESET indicates all audio stopped. Used when it (re)starts (e.g. after it crashes). |
| 560 | RESET = 2; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 561 | } |
| 562 | optional State state = 2; |
| 563 | } |
| 564 | |
| 565 | /** |
| 566 | * Logs when the video codec state changes. |
| 567 | * |
| 568 | * Logged from: |
Bookatz | 235343d | 2018-03-26 13:03:50 -0700 | [diff] [blame] | 569 | * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 570 | */ |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 571 | message MediaCodecStateChanged { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 572 | repeated AttributionNode attribution_node = 1; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 573 | |
| 574 | enum State { |
| 575 | OFF = 0; |
| 576 | ON = 1; |
Bookatz | 235343d | 2018-03-26 13:03:50 -0700 | [diff] [blame] | 577 | // RESET indicates all mediaCodec stopped. Used when it (re)starts (e.g. after it crashes). |
| 578 | RESET = 2; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 579 | } |
| 580 | optional State state = 2; |
| 581 | } |
| 582 | |
| 583 | /** |
| 584 | * Logs when the flashlight state changes. |
| 585 | * |
| 586 | * Logged from: |
Bookatz | 235343d | 2018-03-26 13:03:50 -0700 | [diff] [blame] | 587 | * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 588 | */ |
| 589 | message FlashlightStateChanged { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 590 | repeated AttributionNode attribution_node = 1; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 591 | |
| 592 | enum State { |
| 593 | OFF = 0; |
| 594 | ON = 1; |
Bookatz | 235343d | 2018-03-26 13:03:50 -0700 | [diff] [blame] | 595 | // RESET indicates all flashlight stopped. Used when it (re)starts (e.g. after it crashes). |
| 596 | RESET = 2; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 597 | } |
| 598 | optional State state = 2; |
| 599 | } |
| 600 | |
| 601 | /** |
| 602 | * Logs when the camera 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 CameraStateChanged { |
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 | |
| 610 | enum State { |
| 611 | OFF = 0; |
| 612 | ON = 1; |
Bookatz | 235343d | 2018-03-26 13:03:50 -0700 | [diff] [blame] | 613 | // RESET indicates all camera stopped. Used when it (re)starts (e.g. after it crashes). |
| 614 | RESET = 2; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 615 | } |
| 616 | optional State state = 2; |
| 617 | } |
| 618 | |
| 619 | /** |
| 620 | * 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] | 621 | * |
| 622 | * Logged from: |
| 623 | * TODO |
| 624 | */ |
Bookatz | d674624 | 2017-10-24 18:39:35 -0700 | [diff] [blame] | 625 | message WakelockStateChanged { |
Yangster-mac | 2087716 | 2017-12-22 17:19:39 -0800 | [diff] [blame] | 626 | repeated AttributionNode attribution_node = 1; |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 627 | |
Bookatz | 1a1b046 | 2018-01-12 11:47:03 -0800 | [diff] [blame] | 628 | // The type (level) of the wakelock; e.g. a partial wakelock or a full wakelock. |
| 629 | // From frameworks/base/core/proto/android/os/enums.proto. |
| 630 | optional android.os.WakeLockLevelEnum level = 2; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 631 | |
| 632 | // The wakelock tag (Called tag in the Java API, sometimes name elsewhere). |
| 633 | optional string tag = 3; |
| 634 | |
| 635 | enum State { |
Yangster-mac | cfdf3a4 | 2017-12-06 13:42:38 -0800 | [diff] [blame] | 636 | RELEASE = 0; |
| 637 | ACQUIRE = 1; |
| 638 | CHANGE_RELEASE = 2; |
| 639 | CHANGE_ACQUIRE = 3; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 640 | } |
| 641 | optional State state = 4; |
| 642 | } |
| 643 | |
| 644 | /** |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 645 | * Logs when a partial wakelock is considered 'long' (over 1 min). |
| 646 | * |
| 647 | * Logged from: |
| 648 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
| 649 | */ |
| 650 | message LongPartialWakelockStateChanged { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 651 | repeated AttributionNode attribution_node = 1; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 652 | |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 653 | // The wakelock tag (Called tag in the Java API, sometimes name elsewhere). |
| 654 | optional string tag = 2; |
| 655 | |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 656 | // TODO: I have no idea what this is. |
| 657 | optional string history_tag = 3; |
| 658 | |
| 659 | enum State { |
| 660 | OFF = 0; |
| 661 | ON = 1; |
| 662 | } |
| 663 | optional State state = 4; |
Yao Chen | d54f9dd | 2017-10-17 17:37:48 +0000 | [diff] [blame] | 664 | } |
| 665 | |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 666 | /** |
| 667 | * Logs Battery Saver state change. |
| 668 | * |
| 669 | * Logged from: |
| 670 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
| 671 | */ |
| 672 | message BatterySaverModeStateChanged { |
| 673 | enum State { |
| 674 | OFF = 0; |
| 675 | ON = 1; |
| 676 | } |
| 677 | optional State state = 1; |
| 678 | } |
| 679 | |
| 680 | /** |
| 681 | * Logs Doze mode state change. |
| 682 | * |
| 683 | * Logged from: |
Bookatz | ddccf0a | 2017-11-28 16:48:14 -0800 | [diff] [blame] | 684 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 685 | */ |
| 686 | message DeviceIdleModeStateChanged { |
Bookatz | 8bdae8d | 2018-01-16 11:24:30 -0800 | [diff] [blame] | 687 | optional android.server.DeviceIdleModeEnum state = 1; |
Bookatz | ddccf0a | 2017-11-28 16:48:14 -0800 | [diff] [blame] | 688 | } |
| 689 | |
| 690 | |
| 691 | /** |
| 692 | * Logs state change of Doze mode including maintenance windows. |
| 693 | * |
| 694 | * Logged from: |
| 695 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
| 696 | */ |
| 697 | message DeviceIdlingModeStateChanged { |
Bookatz | 8bdae8d | 2018-01-16 11:24:30 -0800 | [diff] [blame] | 698 | optional android.server.DeviceIdleModeEnum state = 1; |
Bookatz | c1a050a | 2017-10-10 15:49:28 -0700 | [diff] [blame] | 699 | } |
| 700 | |
| 701 | /** |
| 702 | * Logs screen brightness level. |
| 703 | * |
| 704 | * Logged from: |
| 705 | * frameworks/base/services/core/java/com/android/server/am/BatteryStatsService.java |
| 706 | */ |
| 707 | message ScreenBrightnessChanged { |
| 708 | // Screen brightness level. Should be in [-1, 255] according to PowerManager.java. |
| 709 | optional int32 level = 1; |
Bookatz | 8c6571b | 2017-10-24 15:04:41 -0700 | [diff] [blame] | 710 | } |
| 711 | |
| 712 | /** |
| 713 | * Logs battery level (percent full, from 0 to 100). |
| 714 | * |
| 715 | * Logged from: |
David Chen | c28b2bb | 2017-10-24 12:52:52 -0700 | [diff] [blame] | 716 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
Bookatz | 8c6571b | 2017-10-24 15:04:41 -0700 | [diff] [blame] | 717 | */ |
| 718 | message BatteryLevelChanged { |
| 719 | // Battery level. Should be in [0, 100]. |
| 720 | optional int32 battery_level = 1; |
| 721 | } |
| 722 | |
| 723 | /** |
| 724 | * Logs change in charging status of the device. |
| 725 | * |
| 726 | * Logged from: |
David Chen | c28b2bb | 2017-10-24 12:52:52 -0700 | [diff] [blame] | 727 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
Bookatz | 8c6571b | 2017-10-24 15:04:41 -0700 | [diff] [blame] | 728 | */ |
| 729 | message ChargingStateChanged { |
Bookatz | 1a1b046 | 2018-01-12 11:47:03 -0800 | [diff] [blame] | 730 | // State of the battery, from frameworks/base/core/proto/android/os/enums.proto. |
| 731 | optional android.os.BatteryStatusEnum state = 1; |
Bookatz | 8c6571b | 2017-10-24 15:04:41 -0700 | [diff] [blame] | 732 | } |
| 733 | |
| 734 | /** |
| 735 | * Logs whether the device is plugged in, and what power source it is using. |
| 736 | * |
| 737 | * Logged from: |
David Chen | c28b2bb | 2017-10-24 12:52:52 -0700 | [diff] [blame] | 738 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
Bookatz | 8c6571b | 2017-10-24 15:04:41 -0700 | [diff] [blame] | 739 | */ |
| 740 | message PluggedStateChanged { |
Bookatz | 1a1b046 | 2018-01-12 11:47:03 -0800 | [diff] [blame] | 741 | // Whether the device is plugged in, from frameworks/base/core/proto/android/os/enums.proto. |
| 742 | optional android.os.BatteryPluggedStateEnum state = 1; |
Bookatz | 8c6571b | 2017-10-24 15:04:41 -0700 | [diff] [blame] | 743 | } |
| 744 | |
Bookatz | 8c6571b | 2017-10-24 15:04:41 -0700 | [diff] [blame] | 745 | /** |
| 746 | * Logs when an app's wakeup alarm fires. |
| 747 | * |
| 748 | * Logged from: |
David Chen | c28b2bb | 2017-10-24 12:52:52 -0700 | [diff] [blame] | 749 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
Bookatz | 8c6571b | 2017-10-24 15:04:41 -0700 | [diff] [blame] | 750 | */ |
| 751 | message WakeupAlarmOccurred { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 752 | repeated AttributionNode attribution_node = 1; |
Bookatz | ddccf0a | 2017-11-28 16:48:14 -0800 | [diff] [blame] | 753 | |
| 754 | // Name of the wakeup alarm. |
| 755 | optional string tag = 2; |
Bookatz | caf2293e | 2018-09-23 13:07:43 -0700 | [diff] [blame^] | 756 | |
| 757 | // Name of source package (for historical reasons, since BatteryStats tracked it). |
| 758 | optional string package_name = 3; |
Bookatz | ddccf0a | 2017-11-28 16:48:14 -0800 | [diff] [blame] | 759 | } |
| 760 | |
| 761 | /** |
| 762 | * Logs when an an app causes the mobile radio to change state. |
| 763 | * Changing from LOW to MEDIUM or HIGH can be considered the app waking the mobile radio. |
| 764 | * |
| 765 | * Logged from: |
Bookatz | 0b028b1 | 2018-05-31 16:51:17 -0700 | [diff] [blame] | 766 | * frameworks/base/services/core/java/com/android/server/NetworkManagementService.java |
Bookatz | ddccf0a | 2017-11-28 16:48:14 -0800 | [diff] [blame] | 767 | */ |
| 768 | message MobileRadioPowerStateChanged { |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 769 | repeated AttributionNode attribution_node = 1; |
Bookatz | ddccf0a | 2017-11-28 16:48:14 -0800 | [diff] [blame] | 770 | |
Bookatz | 1a1b046 | 2018-01-12 11:47:03 -0800 | [diff] [blame] | 771 | // Power state, from frameworks/base/core/proto/android/telephony/enums.proto. |
| 772 | optional android.telephony.DataConnectionPowerStateEnum state = 2; |
Bookatz | ddccf0a | 2017-11-28 16:48:14 -0800 | [diff] [blame] | 773 | } |
| 774 | |
| 775 | /** |
| 776 | * Logs when an an app causes the wifi radio to change state. |
| 777 | * Changing from LOW to MEDIUM or HIGH can be considered the app waking the wifi radio. |
| 778 | * |
| 779 | * Logged from: |
Bookatz | 0b028b1 | 2018-05-31 16:51:17 -0700 | [diff] [blame] | 780 | * frameworks/base/services/core/java/com/android/server/NetworkManagementService.java |
Bookatz | ddccf0a | 2017-11-28 16:48:14 -0800 | [diff] [blame] | 781 | */ |
| 782 | message WifiRadioPowerStateChanged { |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 783 | repeated AttributionNode attribution_node = 1; |
Bookatz | ddccf0a | 2017-11-28 16:48:14 -0800 | [diff] [blame] | 784 | |
Bookatz | 1a1b046 | 2018-01-12 11:47:03 -0800 | [diff] [blame] | 785 | // Power state, from frameworks/base/core/proto/android/telephony/enums.proto. |
| 786 | optional android.telephony.DataConnectionPowerStateEnum state = 2; |
Bookatz | 8c6571b | 2017-10-24 15:04:41 -0700 | [diff] [blame] | 787 | } |
| 788 | |
| 789 | /** |
| 790 | * Logs kernel wakeup reasons and aborts. |
| 791 | * |
| 792 | * Logged from: |
Bookatz | 56585ca | 2018-09-07 11:38:45 -0700 | [diff] [blame] | 793 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
Bookatz | 8c6571b | 2017-10-24 15:04:41 -0700 | [diff] [blame] | 794 | */ |
| 795 | message KernelWakeupReported { |
| 796 | // Name of the kernel wakeup reason (or abort). |
| 797 | optional string wakeup_reason_name = 1; |
| 798 | |
| 799 | // Duration (in microseconds) for the wake-up interrupt to be serviced. |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 800 | optional int64 duration_micros = 2; |
Bookatz | e588524 | 2017-10-24 20:10:31 -0700 | [diff] [blame] | 801 | } |
| 802 | |
| 803 | /** |
| 804 | * Logs wifi locks held by an app. |
| 805 | * |
| 806 | * Logged from: |
David Chen | c28b2bb | 2017-10-24 12:52:52 -0700 | [diff] [blame] | 807 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
Bookatz | e588524 | 2017-10-24 20:10:31 -0700 | [diff] [blame] | 808 | */ |
| 809 | message WifiLockStateChanged { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 810 | repeated AttributionNode attribution_node = 1; |
Bookatz | e588524 | 2017-10-24 20:10:31 -0700 | [diff] [blame] | 811 | |
| 812 | enum State { |
| 813 | OFF = 0; |
| 814 | ON = 1; |
| 815 | } |
| 816 | optional State state = 2; |
| 817 | } |
| 818 | |
| 819 | /** |
| 820 | * Logs wifi signal strength changes. |
| 821 | * |
| 822 | * Logged from: |
David Chen | c28b2bb | 2017-10-24 12:52:52 -0700 | [diff] [blame] | 823 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
Bookatz | e588524 | 2017-10-24 20:10:31 -0700 | [diff] [blame] | 824 | */ |
| 825 | message WifiSignalStrengthChanged { |
Bookatz | 1a1b046 | 2018-01-12 11:47:03 -0800 | [diff] [blame] | 826 | // Signal strength, from frameworks/base/core/proto/android/telephony/enums.proto. |
| 827 | optional android.telephony.SignalStrengthEnum signal_strength = 1; |
Bookatz | e588524 | 2017-10-24 20:10:31 -0700 | [diff] [blame] | 828 | } |
| 829 | |
| 830 | /** |
| 831 | * Logs wifi scans performed by an app. |
| 832 | * |
| 833 | * Logged from: |
David Chen | c28b2bb | 2017-10-24 12:52:52 -0700 | [diff] [blame] | 834 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
Bookatz | e588524 | 2017-10-24 20:10:31 -0700 | [diff] [blame] | 835 | */ |
| 836 | message WifiScanStateChanged { |
Yangster-mac | afad8c6 | 2018-01-05 22:30:49 -0800 | [diff] [blame] | 837 | repeated AttributionNode attribution_node = 1; |
Bookatz | e588524 | 2017-10-24 20:10:31 -0700 | [diff] [blame] | 838 | |
| 839 | enum State { |
| 840 | OFF = 0; |
| 841 | ON = 1; |
| 842 | } |
| 843 | optional State state = 2; |
| 844 | } |
| 845 | |
| 846 | /** |
Tej Singh | 4503e10 | 2018-01-04 14:35:01 -0800 | [diff] [blame] | 847 | * Logs wifi multicast locks held by an app |
| 848 | * |
| 849 | * Logged from: |
| 850 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
| 851 | */ |
| 852 | message WifiMulticastLockStateChanged { |
| 853 | repeated AttributionNode attribution_node = 1; |
| 854 | |
| 855 | enum State { |
| 856 | OFF = 0; |
| 857 | ON = 1; |
| 858 | } |
| 859 | optional State state = 2; |
| 860 | } |
| 861 | |
| 862 | /** |
Tej Singh | 1ea4289 | 2018-01-19 09:27:00 -0800 | [diff] [blame] | 863 | * Logs shutdown reason and duration on next boot. |
| 864 | * |
| 865 | * Logged from: |
| 866 | * frameworks/base/core/java/com/android/server/BootReceiver.java |
| 867 | */ |
| 868 | message ShutdownSequenceReported { |
| 869 | // True if shutdown is for a reboot. Default: false if we do not know. |
| 870 | optional bool reboot = 1; |
| 871 | |
| 872 | // Reason for shutdown. Eg: userrequested. Default: "<EMPTY>". |
| 873 | optional string reason = 2; |
| 874 | |
| 875 | // Beginning of shutdown time in ms using wall clock time since unix epoch. |
| 876 | // Default: 0 if no start time received. |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 877 | optional int64 start_time_millis = 3; |
Tej Singh | 1ea4289 | 2018-01-19 09:27:00 -0800 | [diff] [blame] | 878 | |
| 879 | // Duration of shutdown in ms. Default: 0 if no duration received. |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 880 | optional int64 duration_millis = 4; |
Tej Singh | 1ea4289 | 2018-01-19 09:27:00 -0800 | [diff] [blame] | 881 | } |
| 882 | |
Tej Singh | 6483ea4 | 2018-01-25 17:45:49 -0800 | [diff] [blame] | 883 | |
| 884 | /** |
| 885 | * Logs boot reason and duration. |
| 886 | * |
| 887 | * Logged from: |
| 888 | * system/core/bootstat/bootstat.cpp |
| 889 | */ |
| 890 | message BootSequenceReported { |
| 891 | // Reason for bootloader boot. Eg. reboot. See bootstat.cpp for larger list |
| 892 | // Default: "<EMPTY>" if not available. |
| 893 | optional string bootloader_reason = 1; |
| 894 | |
| 895 | // Reason for system boot. Eg. bootloader, reboot,userrequested |
| 896 | // Default: "<EMPTY>" if not available. |
| 897 | optional string system_reason = 2; |
| 898 | |
| 899 | // 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] | 900 | optional int64 end_time_millis = 3; |
Tej Singh | 6483ea4 | 2018-01-25 17:45:49 -0800 | [diff] [blame] | 901 | |
| 902 | // Total boot duration in ms. |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 903 | optional int64 total_duration_millis = 4; |
Tej Singh | 6483ea4 | 2018-01-25 17:45:49 -0800 | [diff] [blame] | 904 | |
| 905 | // Bootloader duration in ms. |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 906 | optional int64 bootloader_duration_millis = 5; |
Tej Singh | 6483ea4 | 2018-01-25 17:45:49 -0800 | [diff] [blame] | 907 | |
| 908 | // Time since last boot in ms. Default: 0 if not available. |
| 909 | optional int64 time_since_last_boot = 6; |
| 910 | } |
| 911 | |
Tej Singh | c477d9c | 2018-02-05 18:31:39 -0800 | [diff] [blame] | 912 | |
| 913 | /** |
| 914 | * Logs call state and disconnect cause (if applicable). |
| 915 | * |
| 916 | * Logged from: |
| 917 | * packages/services/Telecomm/src/com/android/server/telecom/Call.java |
| 918 | */ |
| 919 | message CallStateChanged { |
| 920 | // The state of the call. Eg. DIALING, ACTIVE, ON_HOLD, DISCONNECTED. |
| 921 | // From frameworks/base/core/proto/android/telecomm/enums.proto. |
| 922 | optional android.telecom.CallStateEnum call_state = 1; |
| 923 | |
| 924 | // The reason the call disconnected. Eg. ERROR, MISSED, REJECTED, BUSY. |
| 925 | // This value is only applicable when the call_state is DISCONNECTED, and |
| 926 | // should always be UNKNOWN if the call_state is not DISCONNECTED. |
| 927 | // From frameworks/base/core/proto/android/telecomm/enums.proto. |
| 928 | optional android.telecom.DisconnectCauseEnum disconnect_cause = 2; |
| 929 | |
| 930 | // True if the call is self-managed, which are apps that use the |
| 931 | // telecom infrastructure to make their own calls. |
| 932 | optional bool self_managed = 3; |
| 933 | |
| 934 | // True if call is external. External calls are calls on connected Wear |
| 935 | // devices but show up in Telecom so the user can pull them onto the device. |
| 936 | optional bool external_call = 4; |
| 937 | } |
| 938 | |
Tej Singh | 1ea4289 | 2018-01-19 09:27:00 -0800 | [diff] [blame] | 939 | /** |
Tej Singh | dd7bd35 | 2018-02-09 19:33:15 -0800 | [diff] [blame] | 940 | * Logs keyguard state. The keyguard is the lock screen. |
| 941 | * |
| 942 | * Logged from: |
| 943 | * frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java |
| 944 | */ |
| 945 | message KeyguardStateChanged { |
| 946 | enum State { |
| 947 | UNKNOWN = 0; |
| 948 | // The keyguard is hidden when the phone is unlocked. |
| 949 | HIDDEN = 1; |
| 950 | // The keyguard is shown when the phone is locked (screen turns off). |
| 951 | SHOWN= 2; |
| 952 | // The keyguard is occluded when something is overlaying the keyguard. |
| 953 | // Eg. Opening the camera while on the lock screen. |
| 954 | OCCLUDED = 3; |
| 955 | } |
| 956 | optional State state = 1; |
| 957 | } |
| 958 | |
| 959 | /** |
| 960 | * Logs keyguard bouncer state. The bouncer is a part of the keyguard, and |
| 961 | * prompts the user to enter a password (pattern, pin, etc). |
| 962 | * |
| 963 | * Logged from: |
| 964 | * frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBouncer.java |
| 965 | */ |
| 966 | |
| 967 | message KeyguardBouncerStateChanged { |
| 968 | enum State { |
| 969 | UNKNOWN = 0; |
| 970 | // Bouncer is hidden, either as a result of successfully entering the |
| 971 | // password, screen timing out, or user going back to lock screen. |
| 972 | HIDDEN = 1; |
| 973 | // This is when the user is being prompted to enter the password. |
| 974 | SHOWN = 2; |
| 975 | } |
| 976 | optional State state = 1; |
| 977 | } |
| 978 | |
| 979 | /** |
| 980 | * Logs the result of entering a password into the keyguard bouncer. |
| 981 | * |
| 982 | * Logged from: |
| 983 | * frameworks/base/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainer.java |
| 984 | */ |
| 985 | message KeyguardBouncerPasswordEntered { |
| 986 | enum BouncerResult { |
| 987 | UNKNOWN = 0; |
| 988 | // The password entered was incorrect. |
| 989 | FAILURE = 1; |
| 990 | // The password entered was correct. |
| 991 | SUCCESS = 2; |
| 992 | } |
| 993 | optional BouncerResult result = 1; |
| 994 | } |
| 995 | |
Tej Singh | a883b37 | 2018-02-15 11:30:01 -0800 | [diff] [blame] | 996 | /* |
| 997 | * Logs changes to the configuration of the device. The configuration is defined |
| 998 | * in frameworks/base/core/java/android/content/res/Configuration.java |
| 999 | * More documentation is at https://d.android.com/reference/android/content/res/Configuration.html |
| 1000 | * Please go there to interpret the possible values each field can be. |
| 1001 | * |
| 1002 | * Logged from: |
| 1003 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
| 1004 | */ |
| 1005 | message ResourceConfigurationChanged { |
| 1006 | // Bit mask of color capabilities of the screen. |
| 1007 | // Contains information about the color gamut and hdr mode of the screen. |
| 1008 | // See: https://d.android.com/reference/android/content/res/Configuration.html#colorMode |
| 1009 | optional int32 colorMode = 1; |
| 1010 | |
| 1011 | // The target screen density being rendered to. |
| 1012 | // See: https://d.android.com/reference/android/content/res/Configuration.html#densityDpi |
| 1013 | optional int32 densityDpi = 2; |
| 1014 | |
| 1015 | // Current user preference for the scaling factor for fonts, |
| 1016 | // relative to the base density scaling. |
| 1017 | // See: https://d.android.com/reference/android/content/res/Configuration.html#fontScale |
| 1018 | optional float fontScale = 3; |
| 1019 | |
| 1020 | // Flag indicating whether the hard keyboard is hidden. |
| 1021 | // See: https://d.android.com/reference/android/content/res/Configuration.html#hardKeyboardHidden |
| 1022 | optional int32 hardKeyboardHidden = 4; |
| 1023 | |
| 1024 | // The type of keyboard attached to the device. |
| 1025 | // See: https://d.android.com/reference/android/content/res/Configuration.html#keyboard |
| 1026 | optional int32 keyboard = 5; |
| 1027 | |
| 1028 | // Flag indicating whether any keyboard is available. Takes soft keyboards into account. |
| 1029 | // See: https://d.android.com/reference/android/content/res/Configuration.html#keyboardHidden |
| 1030 | optional int32 keyboardHideen = 6; |
| 1031 | |
| 1032 | // IMSI MCC (Mobile Country Code), corresponding to mcc resource qualifier. |
| 1033 | // 0 if undefined. |
| 1034 | // See: https://d.android.com/reference/android/content/res/Configuration.html#mcc |
| 1035 | optional int32 mcc = 7; |
| 1036 | |
| 1037 | // IMSI MNC (Mobile Network Code), corresponding to mnc resource qualifier. |
| 1038 | // 0 if undefined. Note: the actual MNC may be 0, to check for this use the |
| 1039 | // MNC_ZERO symbol defined in Configuration.java. |
| 1040 | // See: https://d.android.com/reference/android/content/res/Configuration.html#mnc |
| 1041 | optional int32 mnc = 8; |
| 1042 | |
| 1043 | // The kind of navigation available on the device. |
| 1044 | // See: https://developer.android.com/reference/android/content/res/Configuration.html#navigation |
| 1045 | optional int32 navigation = 9; |
| 1046 | |
| 1047 | // Flag indicating whether the navigation is available. |
| 1048 | // See: https://d.android.com/reference/android/content/res/Configuration.html#navigationHidden |
| 1049 | optional int32 navigationHidden = 10; |
| 1050 | |
| 1051 | // Overall orientation of the screen. |
| 1052 | // See: https://d.android.com/reference/android/content/res/Configuration.html#orientation |
| 1053 | optional int32 orientation = 11; |
| 1054 | |
| 1055 | // The current height of the available screen space, in dp units. |
| 1056 | // See: https://d.android.com/reference/android/content/res/Configuration.html#screenHeightDp |
| 1057 | optional int32 screenHeightDp = 12; |
| 1058 | |
| 1059 | // Bit mask of overall layout of the screen. |
| 1060 | // Contains information about screen size, whether the screen is wider/taller |
| 1061 | // than normal, whether the screen layout is right-tl-left or left-to-right, |
| 1062 | // and whether the screen has a rounded shape. |
| 1063 | // See: https://d.android.com/reference/android/content/res/Configuration.html#screenLayout |
| 1064 | optional int32 screenLayout = 13; |
| 1065 | |
| 1066 | // Current width of the available screen space, in dp units. |
| 1067 | // See: https://d.android.com/reference/android/content/res/Configuration.html#screenWidthDp |
| 1068 | optional int32 screenWidthDp = 14; |
| 1069 | |
| 1070 | // The smallest screen size an application will see in normal operation. |
| 1071 | // This is the smallest value of both screenWidthDp and screenHeightDp |
| 1072 | // in portrait and landscape. |
| 1073 | // See: https://d.android.com/reference/android/content/res/Configuration.html#smallestScreenWidthDp |
| 1074 | optional int32 smallestScreenWidthDp = 15; |
| 1075 | |
| 1076 | // The type of touch screen attached to the device. |
| 1077 | // See: https://d.android.com/reference/android/content/res/Configuration.html#touchscreen |
| 1078 | optional int32 touchscreen = 16; |
| 1079 | |
| 1080 | // Bit mask of the ui mode. |
| 1081 | // Contains information about the overall ui mode of the device. |
| 1082 | // Eg: NORMAL, DESK, CAR, TELEVISION, WATCH, VR_HEADSET |
| 1083 | // Also contains information about whether the device is in night mode. |
| 1084 | // See: https://d.android.com/reference/android/content/res/Configuration.html#uiMode |
| 1085 | optional int32 uiMode = 17; |
| 1086 | } |
| 1087 | |
Tej Singh | eee317b | 2018-03-07 19:28:05 -0800 | [diff] [blame] | 1088 | |
| 1089 | /** |
| 1090 | * Logs changes in the connection state of the mobile radio. |
| 1091 | * |
| 1092 | * Logged from: |
| 1093 | * frameworks/opt/telephony/src/java/com/android/internal/telephony/dataconnection/DataConnection.java |
| 1094 | */ |
| 1095 | message MobileConnectionStateChanged { |
| 1096 | // States are from the state machine DataConnection.java. |
| 1097 | enum State { |
| 1098 | UNKNOWN = 0; |
| 1099 | // The connection is inactive, or disconnected. |
| 1100 | INACTIVE = 1; |
| 1101 | // The connection is being activated, or connecting. |
| 1102 | ACTIVATING = 2; |
| 1103 | // The connection is active, or connected. |
| 1104 | ACTIVE = 3; |
| 1105 | // The connection is disconnecting. |
| 1106 | DISCONNECTING = 4; |
| 1107 | // The connection is disconnecting after creating a connection. |
| 1108 | DISCONNECTION_ERROR_CREATING_CONNECTION = 5; |
| 1109 | } |
| 1110 | optional State state = 1; |
| 1111 | // For multi-sim phones, this distinguishes between the sim cards. |
| 1112 | optional int32 sim_slot_index = 2; |
| 1113 | // Used to identify the connection. Starts at 0 and increments by 1 for |
| 1114 | // every new network created. Resets whenever the device reboots. |
| 1115 | optional int32 data_connection_id = 3; |
| 1116 | // A bitmask for the capabilities of this connection. |
| 1117 | // Eg. DEFAULT (internet), MMS, SUPL, DUN, IMS. |
| 1118 | // Default value (if we have no information): 0 |
| 1119 | optional int64 capabilities = 4; |
| 1120 | // If this connection has internet. |
| 1121 | // This just checks if the DEFAULT bit of capabilities is set. |
| 1122 | optional bool has_internet = 5; |
| 1123 | } |
| 1124 | |
| 1125 | /** |
| 1126 | * Logs changes in mobile radio technology. eg: LTE, EDGE, CDMA. |
| 1127 | * |
| 1128 | * Logged from: |
| 1129 | * frameworks/opt/telephony/src/java/com/android/internal/telephony/ServiceStateTracker.java |
| 1130 | */ |
| 1131 | message MobileRadioTechnologyChanged { |
| 1132 | optional android.telephony.NetworkTypeEnum state = 1; |
| 1133 | // For multi-sim phones, this distinguishes between the sim cards. |
| 1134 | optional int32 sim_slot_index = 2; |
| 1135 | } |
| 1136 | |
Andrew Chant | b56388b | 2018-03-22 21:07:33 -0700 | [diff] [blame] | 1137 | /** |
| 1138 | * Logs the VID and PID of any connected USB devices. |
| 1139 | * |
| 1140 | * Notes if any Audio, HID (input buttons/mouse/keyboard), or Storage interfaces are present. |
| 1141 | * |
| 1142 | * Logged by Vendor. |
| 1143 | */ |
| 1144 | message UsbDeviceAttached { |
| 1145 | optional int32 vid = 1; |
| 1146 | optional int32 pid = 2; |
| 1147 | optional bool has_audio = 3; |
| 1148 | optional bool has_hid = 4; |
| 1149 | optional bool has_storage = 5; |
| 1150 | } |
| 1151 | |
Tej Singh | eee317b | 2018-03-07 19:28:05 -0800 | [diff] [blame] | 1152 | |
Tej Singh | dd7bd35 | 2018-02-09 19:33:15 -0800 | [diff] [blame] | 1153 | /** |
Tej Singh | 5d991e1 | 2018-03-09 19:48:11 -0800 | [diff] [blame] | 1154 | * Logs when Bluetooth is enabled and disabled. |
| 1155 | * |
| 1156 | * Logged from: |
| 1157 | * services/core/java/com/android/server/BluetoothManagerService.java |
| 1158 | */ |
| 1159 | message BluetoothEnabledStateChanged { |
| 1160 | repeated AttributionNode attribution_node = 1; |
| 1161 | // Whether or not bluetooth is enabled on the device. |
| 1162 | enum State { |
| 1163 | UNKNOWN = 0; |
| 1164 | ENABLED = 1; |
| 1165 | DISABLED = 2; |
| 1166 | } |
| 1167 | optional State state = 2; |
| 1168 | // The reason for being enabled/disabled. |
| 1169 | // Eg. Airplane mode, crash, application request. |
| 1170 | optional android.bluetooth.EnableDisableReasonEnum reason = 3; |
| 1171 | // If the reason is an application request, this will be the package name. |
| 1172 | optional string pkgName = 4; |
| 1173 | } |
| 1174 | |
| 1175 | /** |
| 1176 | * Logs when a Bluetooth device connects and disconnects. |
| 1177 | * |
| 1178 | * Logged from: |
| 1179 | * packages/apps/Bluetooth/src/com/android/bluetooth/btservice/AdapterProperties.java |
| 1180 | */ |
| 1181 | message BluetoothConnectionStateChanged { |
| 1182 | // The state of the connection. |
| 1183 | // Eg: CONNECTING, CONNECTED, DISCONNECTING, DISCONNECTED. |
| 1184 | optional android.bluetooth.ConnectionStateEnum state = 1; |
| 1185 | // An identifier that can be used to match connect and disconnect events. |
| 1186 | // Currently is last two bytes of a hash of a device level ID and |
| 1187 | // the mac address of the bluetooth device that is connected. |
| 1188 | optional int32 obfuscated_id = 2; |
| 1189 | // The profile that is connected. Eg. GATT, A2DP, HEADSET. |
| 1190 | // From android.bluetooth.BluetoothAdapter.java |
| 1191 | optional int32 bt_profile = 3; |
| 1192 | } |
| 1193 | |
| 1194 | /** |
Andrew Chant | 28d627e | 2018-02-22 15:17:05 -0800 | [diff] [blame] | 1195 | * Logs when something is plugged into or removed from the USB-C connector. |
| 1196 | * |
| 1197 | * Logged from: |
| 1198 | * Vendor USB HAL. |
| 1199 | */ |
| 1200 | message UsbConnectorStateChanged { |
| 1201 | enum State { |
| 1202 | DISCONNECTED = 0; |
| 1203 | CONNECTED = 1; |
| 1204 | } |
| 1205 | optional State state = 1; |
| 1206 | } |
| 1207 | |
| 1208 | /** |
| 1209 | * Logs the reported speaker impedance. |
| 1210 | * |
| 1211 | * Logged from: |
| 1212 | * Vendor audio implementation. |
| 1213 | */ |
| 1214 | message SpeakerImpedanceReported { |
| 1215 | optional int32 speaker_location = 1; |
| 1216 | optional int32 impedance = 2; |
| 1217 | } |
| 1218 | |
| 1219 | /** |
| 1220 | * Logs the report of a failed hardware. |
| 1221 | * |
| 1222 | * Logged from: |
| 1223 | * Vendor HALs. |
| 1224 | * |
| 1225 | */ |
| 1226 | message HardwareFailed { |
| 1227 | enum HardwareType { |
| 1228 | HARDWARE_FAILED_UNKNOWN = 0; |
| 1229 | HARDWARE_FAILED_MICROPHONE = 1; |
| 1230 | HARDWARE_FAILED_CODEC = 2; |
| 1231 | HARDWARE_FAILED_SPEAKER = 3; |
| 1232 | HARDWARE_FAILED_FINGERPRINT = 4; |
| 1233 | } |
| 1234 | optional HardwareType hardware_type = 1; |
| 1235 | |
| 1236 | /* hardware_location allows vendors to differentiate between multiple instances of |
| 1237 | * the same hardware_type. The specific locations are vendor defined integers, |
| 1238 | * referring to board-specific numbering schemes. |
| 1239 | */ |
| 1240 | optional int32 hardware_location = 2; |
| 1241 | |
| 1242 | /* failure_code is specific to the HardwareType of the failed hardware. |
| 1243 | * It should use the enum values defined below. |
| 1244 | */ |
| 1245 | enum MicrophoneFailureCode { |
| 1246 | MICROPHONE_FAILURE_COMPLETE = 0; |
| 1247 | } |
| 1248 | enum CodecFailureCode { |
| 1249 | CODEC_FAILURE_COMPLETE = 0; |
| 1250 | } |
| 1251 | enum SpeakerFailureCode { |
| 1252 | SPEAKER_FAILURE_COMPLETE = 0; |
| 1253 | SPEAKER_FAILURE_HIGH_Z = 1; |
| 1254 | SPEAKER_FAILURE_SHORT = 2; |
| 1255 | } |
| 1256 | enum FingerprintFailureCode { |
| 1257 | FINGERPRINT_FAILURE_COMPLETE = 0; |
| 1258 | FINGERPRINT_SENSOR_BROKEN = 1; |
| 1259 | FINGERPRINT_TOO_MANY_DEAD_PIXELS = 2; |
| 1260 | } |
| 1261 | optional int32 failure_code = 3; |
| 1262 | } |
| 1263 | |
| 1264 | /** |
| 1265 | * Log an event when the device has been physically dropped. |
| 1266 | * Reported from the /vendor partition. |
| 1267 | */ |
| 1268 | message PhysicalDropDetected { |
| 1269 | // Confidence that the event was actually a drop, 0 -> 100 |
| 1270 | optional int32 confidence_pctg = 1; |
| 1271 | // Peak acceleration of the drop, in 1/1000s of a g. |
| 1272 | optional int32 accel_peak_thousandths_g = 2; |
Andrew Chant | b56388b | 2018-03-22 21:07:33 -0700 | [diff] [blame] | 1273 | // Duration of freefall in ms |
| 1274 | optional int32 freefall_time_millis = 3; |
Andrew Chant | 28d627e | 2018-02-22 15:17:05 -0800 | [diff] [blame] | 1275 | } |
| 1276 | |
| 1277 | /** |
| 1278 | * Log bucketed battery charge cycles. |
| 1279 | * |
| 1280 | * Each bucket represents cycles of the battery past |
| 1281 | * a given charge point. For example, bucket 1 is the |
| 1282 | * lowest 1/8th of the battery, and bucket 8 is 100%. |
| 1283 | * |
| 1284 | * Logged from: |
| 1285 | * /sys/class/power_supply/bms/cycle_count, via Vendor. |
| 1286 | */ |
| 1287 | message ChargeCyclesReported { |
| 1288 | optional int32 cycle_bucket_1 = 1; |
| 1289 | optional int32 cycle_bucket_2 = 2; |
| 1290 | optional int32 cycle_bucket_3 = 3; |
| 1291 | optional int32 cycle_bucket_4 = 4; |
| 1292 | optional int32 cycle_bucket_5 = 5; |
| 1293 | optional int32 cycle_bucket_6 = 6; |
| 1294 | optional int32 cycle_bucket_7 = 7; |
| 1295 | optional int32 cycle_bucket_8 = 8; |
| 1296 | } |
| 1297 | |
| 1298 | /** |
Tej Singh | bb8554a | 2018-01-26 11:59:14 -0800 | [diff] [blame] | 1299 | * Logs the duration of a davey (jank of >=700ms) when it occurs |
| 1300 | * |
| 1301 | * Logged from: |
| 1302 | * frameworks/base/libs/hwui/JankTracker.cpp |
| 1303 | */ |
| 1304 | message DaveyOccurred { |
David Chen | 77ef671 | 2018-02-23 18:23:42 -0800 | [diff] [blame] | 1305 | // The UID that logged this atom. |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 1306 | optional int32 uid = 1 [(is_uid) = true]; |
David Chen | 77ef671 | 2018-02-23 18:23:42 -0800 | [diff] [blame] | 1307 | |
Tej Singh | bb8554a | 2018-01-26 11:59:14 -0800 | [diff] [blame] | 1308 | // Amount of time it took to render the frame. Should be >=700ms. |
David Chen | 77ef671 | 2018-02-23 18:23:42 -0800 | [diff] [blame] | 1309 | optional int64 jank_duration_millis = 2; |
Tej Singh | bb8554a | 2018-01-26 11:59:14 -0800 | [diff] [blame] | 1310 | } |
| 1311 | |
| 1312 | /** |
Bookatz | e588524 | 2017-10-24 20:10:31 -0700 | [diff] [blame] | 1313 | * Logs phone signal strength changes. |
| 1314 | * |
| 1315 | * Logged from: |
David Chen | c28b2bb | 2017-10-24 12:52:52 -0700 | [diff] [blame] | 1316 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
Bookatz | e588524 | 2017-10-24 20:10:31 -0700 | [diff] [blame] | 1317 | */ |
| 1318 | message PhoneSignalStrengthChanged { |
Bookatz | 1a1b046 | 2018-01-12 11:47:03 -0800 | [diff] [blame] | 1319 | // Signal strength, from frameworks/base/core/proto/android/telephony/enums.proto. |
| 1320 | optional android.telephony.SignalStrengthEnum signal_strength = 1; |
David Chen | c28b2bb | 2017-10-24 12:52:52 -0700 | [diff] [blame] | 1321 | } |
| 1322 | |
| 1323 | /** |
| 1324 | * Logs that a setting was updated. |
| 1325 | * Logged from: |
David Chen | bd78991 | 2018-03-16 17:19:55 -0700 | [diff] [blame] | 1326 | * frameworks/base/packages/SettingsProvider/src/com/android/providers/settings/SettingsState.java |
David Chen | c28b2bb | 2017-10-24 12:52:52 -0700 | [diff] [blame] | 1327 | * The tag and is_default allow resetting of settings to default values based on the specified |
| 1328 | * tag. See Settings#putString(ContentResolver, String, String, String, boolean) for more details. |
| 1329 | */ |
| 1330 | message SettingChanged { |
| 1331 | // The name of the setting. |
| 1332 | optional string setting = 1; |
| 1333 | |
| 1334 | // The change being imposed on this setting. May represent a number, eg "3". |
| 1335 | optional string value = 2; |
| 1336 | |
| 1337 | // The new value of this setting. For most settings, this is same as value. For some settings, |
| 1338 | // value is +X or -X where X represents an element in a set. For example, if the previous value |
| 1339 | // is A,B,C and value is -B, then new_value is A,C and prev_value is A,B,C. |
| 1340 | // The +/- feature is currently only used for location_providers_allowed. |
| 1341 | optional string new_value = 3; |
| 1342 | |
| 1343 | // The previous value of this setting. |
| 1344 | optional string prev_value = 4; |
| 1345 | |
| 1346 | // The tag used with the is_default for resetting sets of settings. This is generally null. |
| 1347 | optional string tag = 5; |
| 1348 | |
Bookatz | 9086762 | 2018-01-31 15:05:57 -0800 | [diff] [blame] | 1349 | // True if this setting with tag should be resettable. |
| 1350 | optional bool is_default = 6; |
David Chen | c28b2bb | 2017-10-24 12:52:52 -0700 | [diff] [blame] | 1351 | |
David Chen | bd78991 | 2018-03-16 17:19:55 -0700 | [diff] [blame] | 1352 | // 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] | 1353 | optional int32 user = 7; |
David Chen | bd78991 | 2018-03-16 17:19:55 -0700 | [diff] [blame] | 1354 | |
| 1355 | enum ChangeReason { |
| 1356 | UPDATED = 1; // Updated can be an insertion or an update. |
| 1357 | DELETED = 2; |
| 1358 | } |
| 1359 | optional ChangeReason reason = 8; |
David Chen | c28b2bb | 2017-10-24 12:52:52 -0700 | [diff] [blame] | 1360 | } |
Chenjie Yu | b3dda41 | 2017-10-24 13:41:59 -0700 | [diff] [blame] | 1361 | |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 1362 | /** |
Chenjie Yu | 3d4f604 | 2017-10-27 15:39:34 -0700 | [diff] [blame] | 1363 | * Logs activity going to foreground or background |
| 1364 | * |
| 1365 | * Logged from: |
| 1366 | * frameworks/base/services/core/java/com/android/server/am/ActivityRecord.java |
| 1367 | */ |
| 1368 | message ActivityForegroundStateChanged { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 1369 | optional int32 uid = 1 [(is_uid) = true]; |
Yangster-mac | 2087716 | 2017-12-22 17:19:39 -0800 | [diff] [blame] | 1370 | optional string pkg_name = 2; |
| 1371 | optional string class_name = 3; |
| 1372 | |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 1373 | enum State { |
| 1374 | BACKGROUND = 0; |
| 1375 | FOREGROUND = 1; |
Chenjie Yu | 3d4f604 | 2017-10-27 15:39:34 -0700 | [diff] [blame] | 1376 | } |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 1377 | optional State state = 4; |
Chenjie Yu | 3d4f604 | 2017-10-27 15:39:34 -0700 | [diff] [blame] | 1378 | } |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 1379 | |
| 1380 | /** |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 1381 | * Logs when an app crashes. |
David Chen | 9e3808c | 2017-11-20 17:25:34 -0800 | [diff] [blame] | 1382 | * Logged from: |
| 1383 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
| 1384 | */ |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 1385 | message AppCrashOccurred { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 1386 | optional int32 uid = 1 [(is_uid) = true]; |
David Chen | 9e3808c | 2017-11-20 17:25:34 -0800 | [diff] [blame] | 1387 | |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 1388 | optional string event_type = 2; |
David Chen | 9e3808c | 2017-11-20 17:25:34 -0800 | [diff] [blame] | 1389 | |
| 1390 | // The name of the process. |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 1391 | // system_server if it is not by an app |
David Chen | 9e3808c | 2017-11-20 17:25:34 -0800 | [diff] [blame] | 1392 | optional string process_name = 3; |
| 1393 | |
| 1394 | // The pid if available. -1 means not available. |
David Chen | 6e3e6cb | 2018-01-03 16:14:06 -0800 | [diff] [blame] | 1395 | optional sint32 pid = 4; |
Chenjie Yu | f17bf62 | 2018-04-02 14:22:19 -0700 | [diff] [blame] | 1396 | |
| 1397 | optional string package_name = 5; |
| 1398 | |
| 1399 | enum InstantApp { |
| 1400 | UNAVAILABLE = 0; |
| 1401 | FALSE = 1; |
| 1402 | TRUE = 2; |
| 1403 | } |
| 1404 | optional InstantApp is_instant_app = 6; |
| 1405 | |
| 1406 | enum ForegroundState { |
| 1407 | UNKNOWN = 0; |
| 1408 | BACKGROUND = 1; |
| 1409 | FOREGROUND = 2; |
| 1410 | } |
| 1411 | optional ForegroundState foreground_state = 7; |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 1412 | } |
David Chen | 9e3808c | 2017-11-20 17:25:34 -0800 | [diff] [blame] | 1413 | |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 1414 | /** |
| 1415 | * Logs when a WTF (What a Terrible Failure) happened. |
| 1416 | * Logged from: |
| 1417 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
| 1418 | */ |
| 1419 | message WTFOccurred { |
| 1420 | optional int32 uid = 1 [(is_uid) = true]; |
David Chen | 9e3808c | 2017-11-20 17:25:34 -0800 | [diff] [blame] | 1421 | |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 1422 | optional string tag = 2; |
David Chen | 9e3808c | 2017-11-20 17:25:34 -0800 | [diff] [blame] | 1423 | |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 1424 | // The name of the process. |
| 1425 | // system_server if it is not by an app |
| 1426 | optional string process_name = 3; |
David Chen | 6e3e6cb | 2018-01-03 16:14:06 -0800 | [diff] [blame] | 1427 | |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 1428 | // The pid if available. -1 means not available. |
| 1429 | optional sint32 pid = 4; |
| 1430 | } |
| 1431 | |
| 1432 | /** |
| 1433 | * Logs when system server reports low memory. |
| 1434 | * Logged from: |
| 1435 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
| 1436 | */ |
| 1437 | message LowMemReported { |
| 1438 | } |
| 1439 | |
| 1440 | /** |
| 1441 | * Logs when an app ANR (App Not Responding) occurs. |
| 1442 | * Logged from: |
| 1443 | * frameworks/base/services/core/java/com/android/server/am/AppErrors.java |
| 1444 | */ |
| 1445 | message ANROccurred { |
| 1446 | optional int32 uid = 1 [(is_uid) = true]; |
| 1447 | |
| 1448 | optional string process_name = 2; |
| 1449 | |
| 1450 | optional string short_component_name = 3; |
| 1451 | |
| 1452 | optional string reason = 4; |
Chenjie Yu | f17bf62 | 2018-04-02 14:22:19 -0700 | [diff] [blame] | 1453 | |
| 1454 | enum InstantApp { |
| 1455 | UNAVAILABLE = 0; |
| 1456 | FALSE = 1; |
| 1457 | TRUE = 2; |
| 1458 | } |
| 1459 | optional InstantApp is_instant_app = 5; |
| 1460 | |
| 1461 | enum ForegroundState { |
| 1462 | UNKNOWN = 0; |
| 1463 | BACKGROUND = 1; |
| 1464 | FOREGROUND = 2; |
| 1465 | } |
| 1466 | optional ForegroundState foreground_state = 6; |
David Chen | 9e3808c | 2017-11-20 17:25:34 -0800 | [diff] [blame] | 1467 | } |
| 1468 | |
Bookatz | a7020bd | 2018-08-28 16:29:35 -0700 | [diff] [blame] | 1469 | /** |
| 1470 | * Logs when the vibrator state changes. |
| 1471 | * Logged from: |
| 1472 | * frameworks/base/services/core/java/com/android/server/VibratorService.java |
| 1473 | */ |
| 1474 | message VibratorStateChanged { |
| 1475 | repeated AttributionNode attribution_node = 1; |
| 1476 | |
| 1477 | enum State { |
| 1478 | OFF = 0; |
| 1479 | ON = 1; |
| 1480 | } |
| 1481 | optional State state = 2; |
| 1482 | |
| 1483 | // Duration (in milliseconds) requested to keep the vibrator on. |
| 1484 | // Only applicable for State == ON. |
| 1485 | optional int64 duration_millis = 3; |
| 1486 | } |
| 1487 | |
David Chen | 0a368b2 | 2017-12-06 16:28:16 -0800 | [diff] [blame] | 1488 | /* |
| 1489 | * Allows other apps to push events into statsd. |
| 1490 | * Logged from: |
| 1491 | * frameworks/base/core/java/android/util/StatsLog.java |
| 1492 | */ |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 1493 | message AppBreadcrumbReported { |
David Chen | 0a368b2 | 2017-12-06 16:28:16 -0800 | [diff] [blame] | 1494 | // The uid of the application that sent this custom atom. |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 1495 | optional int32 uid = 1 [(is_uid) = true]; |
David Chen | 0a368b2 | 2017-12-06 16:28:16 -0800 | [diff] [blame] | 1496 | |
| 1497 | // An arbitrary label chosen by the developer. For Android P, the label should be in [0, 16). |
| 1498 | optional int32 label = 2; |
| 1499 | |
| 1500 | // Allows applications to easily use a custom event as start/stop boundaries (ie, define custom |
| 1501 | // predicates for the metrics). |
| 1502 | enum State { |
| 1503 | UNKNOWN = 0; |
| 1504 | UNSPECIFIED = 1; // For events that are known to not represent START/STOP. |
| 1505 | STOP = 2; |
| 1506 | START = 3; |
| 1507 | } |
| 1508 | optional State state = 3; |
| 1509 | } |
| 1510 | |
David Chen | 9e3808c | 2017-11-20 17:25:34 -0800 | [diff] [blame] | 1511 | /** |
Bookatz | 7948c87 | 2018-09-04 12:58:33 -0700 | [diff] [blame] | 1512 | * Logs the wall-clock time when a significant wall-clock time shift occurs. |
| 1513 | * For example, this could be due to the user manually changing the time. |
| 1514 | * |
| 1515 | * Logged from: |
| 1516 | * frameworks/base/services/core/java/com/android/server/AlarmManagerService.java |
| 1517 | */ |
| 1518 | message WallClockTimeShifted { |
| 1519 | // New wall-clock time in milliseconds, according to System.currentTimeMillis(). |
| 1520 | optional int64 wall_clock_timestamp_millis = 1; |
| 1521 | } |
| 1522 | |
| 1523 | /** |
Bookatz | 8fcd09a | 2017-12-18 13:01:10 -0800 | [diff] [blame] | 1524 | * Logs when statsd detects an anomaly. |
| 1525 | * |
| 1526 | * Logged from: |
| 1527 | * frameworks/base/cmds/statsd/src/anomaly/AnomalyTracker.cpp |
| 1528 | */ |
| 1529 | message AnomalyDetected { |
| 1530 | // Uid that owns the config whose anomaly detection alert fired. |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 1531 | optional int32 config_uid = 1 [(is_uid) = true]; |
Bookatz | 8fcd09a | 2017-12-18 13:01:10 -0800 | [diff] [blame] | 1532 | |
Yangster-mac | 94e197c | 2018-01-02 16:03:03 -0800 | [diff] [blame] | 1533 | // Id of the config whose anomaly detection alert fired. |
| 1534 | optional int64 config_id = 2; |
Bookatz | 8fcd09a | 2017-12-18 13:01:10 -0800 | [diff] [blame] | 1535 | |
Yangster-mac | 94e197c | 2018-01-02 16:03:03 -0800 | [diff] [blame] | 1536 | // Id of the alert (i.e. name of the anomaly that was detected). |
| 1537 | optional int64 alert_id = 3; |
Bookatz | 8fcd09a | 2017-12-18 13:01:10 -0800 | [diff] [blame] | 1538 | } |
| 1539 | |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 1540 | message AppStartOccurred { |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 1541 | // The uid if available. -1 means not available. |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 1542 | optional int32 uid = 1 [(is_uid) = true]; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 1543 | |
| 1544 | // The app package name. |
| 1545 | optional string pkg_name = 2; |
| 1546 | |
| 1547 | enum TransitionType { |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 1548 | UNKNOWN = 0; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 1549 | WARM = 1; |
| 1550 | HOT = 2; |
| 1551 | COLD = 3; |
| 1552 | } |
| 1553 | // The transition type. |
| 1554 | optional TransitionType type = 3; |
| 1555 | |
| 1556 | // The activity name. |
| 1557 | optional string activity_name = 4; |
| 1558 | |
| 1559 | // The name of the calling app. Empty if not set. |
| 1560 | optional string calling_pkg_name = 5; |
| 1561 | |
| 1562 | // Whether the app is an instant app. |
| 1563 | optional bool is_instant_app = 6; |
| 1564 | |
| 1565 | // Device uptime when activity started. |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 1566 | optional int64 activity_start_millis = 7; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 1567 | |
Bookatz | 80d11a0 | 2018-01-16 10:46:35 -0800 | [diff] [blame] | 1568 | optional android.app.AppTransitionReasonEnum reason = 8; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 1569 | |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 1570 | optional int32 transition_delay_millis = 9; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 1571 | // -1 if not set. |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 1572 | optional int32 starting_window_delay_millis = 10; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 1573 | // -1 if not set. |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 1574 | optional int32 bind_application_delay_millis = 11; |
| 1575 | optional int32 windows_drawn_delay_millis = 12; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 1576 | |
| 1577 | // Empty if not set. |
| 1578 | optional string launch_token = 13; |
| 1579 | |
Calin Juravle | 759fbda | 2018-02-20 19:52:30 +0000 | [diff] [blame] | 1580 | // The compiler filter used when when the package was optimized. |
Calin Juravle | a86783b | 2018-03-21 14:25:59 -0700 | [diff] [blame] | 1581 | optional int32 package_optimization_compilation_filter = 14; |
Calin Juravle | 759fbda | 2018-02-20 19:52:30 +0000 | [diff] [blame] | 1582 | |
| 1583 | // The reason why the package was optimized. |
Calin Juravle | a86783b | 2018-03-21 14:25:59 -0700 | [diff] [blame] | 1584 | optional int32 package_optimization_compilation_reason = 15; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 1585 | } |
| 1586 | |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 1587 | message AppStartCanceled { |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 1588 | // The uid if available. -1 means not available. |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 1589 | optional int32 uid = 1 [(is_uid) = true]; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 1590 | |
| 1591 | // The app package name. |
| 1592 | optional string pkg_name = 2; |
| 1593 | |
| 1594 | enum TransitionType { |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 1595 | UNKNOWN = 0; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 1596 | WARM = 1; |
| 1597 | HOT = 2; |
| 1598 | COLD = 3; |
| 1599 | } |
| 1600 | // The transition type. |
| 1601 | optional TransitionType type = 3; |
| 1602 | |
| 1603 | // The activity name. |
| 1604 | optional string activity_name = 4; |
| 1605 | } |
| 1606 | |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 1607 | message AppStartFullyDrawn { |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 1608 | // The uid if available. -1 means not available. |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 1609 | optional int32 uid = 1 [(is_uid) = true]; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 1610 | |
| 1611 | // The app package name. |
| 1612 | optional string pkg_name = 2; |
| 1613 | |
| 1614 | enum TransitionType { |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 1615 | UNKNOWN = 0; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 1616 | WITH_BUNDLE = 1; |
| 1617 | WITHOUT_BUNDLE = 2; |
| 1618 | } |
| 1619 | // The transition type. |
| 1620 | optional TransitionType type = 3; |
| 1621 | |
| 1622 | // The activity name. |
| 1623 | optional string activity_name = 4; |
| 1624 | |
| 1625 | optional bool transition_process_running = 5; |
| 1626 | |
| 1627 | // App startup time (until call to Activity#reportFullyDrawn()). |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 1628 | optional int64 app_startup_time_millis = 6; |
Olivier Gaillard | aed7f12 | 2017-12-12 14:26:22 +0000 | [diff] [blame] | 1629 | } |
| 1630 | |
Bookatz | 8fcd09a | 2017-12-18 13:01:10 -0800 | [diff] [blame] | 1631 | /** |
Chenjie Yu | 52cacc6 | 2017-12-08 18:11:45 -0800 | [diff] [blame] | 1632 | * Logs a picture-in-picture action |
| 1633 | * Logged from: |
| 1634 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
| 1635 | * frameworks/base/services/core/java/com/android/server/am/ActivityStackSupervisor.java |
| 1636 | * frameworks/base/packages/SystemUI/src/com/android/systemui/pip/phone/PipTouchHandler.java |
| 1637 | */ |
| 1638 | message PictureInPictureStateChanged { |
Chenjie Yu | ae9fdf04 | 2018-02-15 10:19:32 -0800 | [diff] [blame] | 1639 | // -1 if it is not available |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 1640 | optional int32 uid = 1 [(is_uid) = true]; |
Chenjie Yu | 52cacc6 | 2017-12-08 18:11:45 -0800 | [diff] [blame] | 1641 | |
Chenjie Yu | ae9fdf04 | 2018-02-15 10:19:32 -0800 | [diff] [blame] | 1642 | optional string short_name = 2; |
Chenjie Yu | 52cacc6 | 2017-12-08 18:11:45 -0800 | [diff] [blame] | 1643 | |
Chenjie Yu | 52cacc6 | 2017-12-08 18:11:45 -0800 | [diff] [blame] | 1644 | enum State { |
| 1645 | ENTERED = 1; |
| 1646 | EXPANDED_TO_FULL_SCREEN = 2; |
| 1647 | MINIMIZED = 3; |
| 1648 | DISMISSED = 4; |
| 1649 | } |
Chenjie Yu | ae9fdf04 | 2018-02-15 10:19:32 -0800 | [diff] [blame] | 1650 | optional State state = 3; |
Chenjie Yu | 52cacc6 | 2017-12-08 18:11:45 -0800 | [diff] [blame] | 1651 | } |
| 1652 | |
| 1653 | /** |
Chenjie Yu | e890419 | 2017-12-08 19:12:57 -0800 | [diff] [blame] | 1654 | * Logs overlay action |
| 1655 | * Logged from: |
| 1656 | * services/core/java/com/android/server/wm/Session.java |
| 1657 | */ |
| 1658 | message OverlayStateChanged { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 1659 | optional int32 uid = 1 [(is_uid) = true]; |
Chenjie Yu | e890419 | 2017-12-08 19:12:57 -0800 | [diff] [blame] | 1660 | |
| 1661 | optional string package_name = 2; |
| 1662 | |
| 1663 | optional bool using_alert_window = 3; |
| 1664 | |
| 1665 | enum State { |
| 1666 | ENTERED = 1; |
| 1667 | EXITED = 2; |
| 1668 | } |
| 1669 | optional State state = 4; |
| 1670 | } |
| 1671 | |
Chenjie Yu | ccfe645 | 2018-01-30 11:33:21 -0800 | [diff] [blame] | 1672 | /* |
| 1673 | * Logs foreground service starts and stops. |
| 1674 | * Note that this is not when a service starts or stops, but when it is |
| 1675 | * considered foreground. |
| 1676 | * Logged from |
| 1677 | * //frameworks/base/services/core/java/com/android/server/am/ActiveServices.java |
| 1678 | */ |
| 1679 | message ForegroundServiceStateChanged { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 1680 | optional int32 uid = 1 [(is_uid) = true]; |
Chenjie Yu | ccfe645 | 2018-01-30 11:33:21 -0800 | [diff] [blame] | 1681 | // package_name + "/" + class_name |
| 1682 | optional string short_name = 2; |
| 1683 | |
| 1684 | enum State { |
| 1685 | ENTER = 1; |
| 1686 | EXIT = 2; |
| 1687 | } |
| 1688 | optional State state = 3; |
| 1689 | } |
| 1690 | |
Chenjie Yu | e890419 | 2017-12-08 19:12:57 -0800 | [diff] [blame] | 1691 | /** |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 1692 | * Logs creation or removal of an isolated uid. Isolated uid's are temporary uid's to sandbox risky |
| 1693 | * behavior in its own uid. However, the metrics of these isolated uid's almost always should be |
| 1694 | * attributed back to the parent (host) uid. One example is Chrome. |
| 1695 | * |
| 1696 | * Logged from: |
| 1697 | * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java |
| 1698 | */ |
| 1699 | message IsolatedUidChanged { |
| 1700 | // 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] | 1701 | // 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] | 1702 | // This field is ignored when event == REMOVED. |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 1703 | optional int32 parent_uid = 1; |
| 1704 | |
| 1705 | optional int32 isolated_uid = 2; |
| 1706 | |
| 1707 | // We expect an isolated uid to be removed before if it's used for another parent uid. |
| 1708 | enum Event { |
| 1709 | REMOVED = 0; |
| 1710 | CREATED = 1; |
| 1711 | } |
| 1712 | optional Event event = 3; |
| 1713 | } |
| 1714 | |
| 1715 | /* |
| 1716 | * Logs the reception of an incoming network packet causing the main system to wake up for |
| 1717 | * processing that packet. These events are notified by the kernel via Netlink NFLOG to Netd |
| 1718 | * and processed by WakeupController.cpp. |
| 1719 | */ |
| 1720 | message PacketWakeupOccurred { |
| 1721 | // The uid owning the socket into which the packet was delivered, or -1 if the packet was |
| 1722 | // delivered nowhere. |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 1723 | optional int32 uid = 1 [(is_uid) = true]; |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 1724 | // The interface name on which the packet was received. |
| 1725 | optional string iface = 2; |
| 1726 | // The ethertype value of the packet. |
| 1727 | optional int32 ethertype = 3; |
| 1728 | // String representation of the destination MAC address of the packet. |
| 1729 | optional string destination_hardware_address = 4; |
| 1730 | // String representation of the source address of the packet if this was an IP packet. |
| 1731 | optional string source_ip = 5; |
| 1732 | // String representation of the destination address of the packet if this was an IP packet. |
| 1733 | optional string destination_ip = 6; |
| 1734 | // The value of the protocol field if this was an IPv4 packet or the value of the Next Header |
| 1735 | // field if this was an IPv6 packet. The range of possible values is the same for both IP |
| 1736 | // families. |
| 1737 | optional int32 ip_next_header = 7; |
| 1738 | // The source port if this was a TCP or UDP packet. |
| 1739 | optional int32 source_port = 8; |
| 1740 | // The destination port if this was a TCP or UDP packet. |
| 1741 | optional int32 destination_port = 9; |
| 1742 | } |
| 1743 | |
| 1744 | /* |
| 1745 | * Logs the memory stats for an app on startup. |
| 1746 | * Logged from: |
| 1747 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
| 1748 | */ |
| 1749 | message AppStartMemoryStateCaptured { |
| 1750 | // The uid if available. -1 means not available. |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 1751 | optional int32 uid = 1 [(is_uid) = true]; |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 1752 | |
| 1753 | // The process name. |
| 1754 | optional string process_name = 2; |
| 1755 | |
| 1756 | // The activity name. |
| 1757 | optional string activity_name = 3; |
| 1758 | |
| 1759 | // # of page-faults |
| 1760 | optional int64 pgfault = 4; |
| 1761 | |
| 1762 | // # of major page-faults |
| 1763 | optional int64 pgmajfault = 5; |
| 1764 | |
| 1765 | // RSS |
| 1766 | optional int64 rss_in_bytes = 6; |
| 1767 | |
| 1768 | // CACHE |
| 1769 | optional int64 cache_in_bytes = 7; |
| 1770 | |
| 1771 | // SWAP |
| 1772 | optional int64 swap_in_bytes = 8; |
| 1773 | } |
| 1774 | |
| 1775 | /* |
| 1776 | * Logs the change in Low Memory Killer Daemon (LMKD) state which is used as start/stop boundaries |
| 1777 | * for LMK event. |
| 1778 | * Logged from: |
| 1779 | * system/core/lmkd/lmkd.c |
| 1780 | */ |
| 1781 | message LmkStateChanged { |
| 1782 | enum State { |
| 1783 | UNKNOWN = 0; |
| 1784 | START = 1; |
| 1785 | STOP = 2; |
| 1786 | } |
| 1787 | optional State state = 1; |
| 1788 | } |
| 1789 | |
| 1790 | /* |
| 1791 | * Logs the event when Low Memory Killer Daemon (LMKD) kills a process to reduce memory pressure. |
| 1792 | * Logged from: |
| 1793 | * system/core/lmkd/lmkd.c |
| 1794 | */ |
| 1795 | message LmkKillOccurred { |
| 1796 | // The uid if available. -1 means not available. |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 1797 | optional int32 uid = 1 [(is_uid) = true]; |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 1798 | |
| 1799 | // The process name. |
| 1800 | optional string process_name = 2; |
| 1801 | |
| 1802 | // oom adj score. |
| 1803 | optional int32 oom_score = 3; |
| 1804 | |
| 1805 | // # of page-faults |
| 1806 | optional int64 pgfault = 4; |
| 1807 | |
| 1808 | // # of major page-faults |
| 1809 | optional int64 pgmajfault = 5; |
| 1810 | |
| 1811 | // RSS |
| 1812 | optional int64 rss_in_bytes = 6; |
| 1813 | |
| 1814 | // CACHE |
| 1815 | optional int64 cache_in_bytes = 7; |
| 1816 | |
| 1817 | // SWAP |
| 1818 | optional int64 swap_in_bytes = 8; |
| 1819 | } |
| 1820 | |
Rajeev Kumar | 51b5460 | 2018-03-01 12:18:26 -0800 | [diff] [blame] | 1821 | /* |
| 1822 | * Logs when the ActivityManagerService detects that an app died. |
| 1823 | * |
| 1824 | * Logged from: |
| 1825 | * frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java |
| 1826 | */ |
| 1827 | message AppDied { |
| 1828 | // timestamp(elapsedRealtime) of record creation |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 1829 | optional uint64 timestamp_millis = 1 [(stateFieldOption).option = EXCLUSIVE]; |
Rajeev Kumar | 51b5460 | 2018-03-01 12:18:26 -0800 | [diff] [blame] | 1830 | } |
| 1831 | |
Howard Ro | 21a039c | 2018-08-06 14:55:47 -0700 | [diff] [blame] | 1832 | /** |
| 1833 | * An atom for generic metrics logging. Available from Android Q. |
| 1834 | */ |
| 1835 | message GenericAtom { |
| 1836 | // The uid of the application that sent this custom atom. |
| 1837 | optional int32 uid = 1 [(is_uid) = true]; |
| 1838 | |
| 1839 | // An event_id indicates the type of event. |
Howard Ro | 0546d54 | 2018-08-30 16:23:44 -0700 | [diff] [blame] | 1840 | optional android.os.statsd.EventType event_id = 2; |
Howard Ro | 21a039c | 2018-08-06 14:55:47 -0700 | [diff] [blame] | 1841 | } |
| 1842 | |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 1843 | /** |
| 1844 | * Logs when a fingerprint acquire event occurs. |
| 1845 | * |
| 1846 | * Logged from: |
| 1847 | * frameworks/base/services/core/java/com/android/server/biometrics/fingerprint/FingerprintService.java |
| 1848 | */ |
| 1849 | message FingerprintAcquired { |
| 1850 | // The associated user. Eg: 0 for owners, 10+ for others. |
| 1851 | // Defined in android/os/UserHandle.java |
| 1852 | optional int32 user = 1; |
| 1853 | // If this acquire is for a crypto fingerprint. |
| 1854 | // e.g. Secure purchases, unlock password storage. |
| 1855 | optional bool is_crypto = 2; |
| 1856 | } |
| 1857 | |
| 1858 | /** |
| 1859 | * Logs when a fingerprint authentication event occurs. |
| 1860 | * |
| 1861 | * Logged from: |
| 1862 | * frameworks/base/services/core/java/com/android/server/biometrics/fingerprint/FingerprintService.java |
| 1863 | */ |
| 1864 | message FingerprintAuthenticated { |
| 1865 | // The associated user. Eg: 0 for owners, 10+ for others. |
| 1866 | // Defined in android/os/UserHandle.java |
| 1867 | optional int32 user = 1; |
| 1868 | // If this authentication is for a crypto fingerprint. |
| 1869 | // e.g. Secure purchases, unlock password storage. |
| 1870 | optional bool is_crypto = 2; |
| 1871 | // Whether or not this authentication was successful. |
| 1872 | optional bool is_authenticated = 3; |
| 1873 | } |
| 1874 | |
| 1875 | /** |
| 1876 | * Logs when a fingerprint error occurs. |
| 1877 | * |
| 1878 | * Logged from: |
| 1879 | * frameworks/base/services/core/java/com/android/server/biometrics/fingerprint/FingerprintService.java |
| 1880 | */ |
| 1881 | message FingerprintErrorOccurred { |
| 1882 | // The associated user. Eg: 0 for owners, 10+ for others. |
| 1883 | // Defined in android/os/UserHandle.java |
| 1884 | optional int32 user = 1; |
| 1885 | // If this error is for a crypto fingerprint. |
| 1886 | // e.g. Secure purchases, unlock password storage. |
| 1887 | optional bool is_crypto = 2; |
| 1888 | |
| 1889 | enum Error { |
| 1890 | UNKNOWN = 0; |
| 1891 | LOCKOUT = 1; |
| 1892 | PERMANENT_LOCKOUT = 2; |
| 1893 | } |
| 1894 | // The type of error. |
| 1895 | optional Error error = 3; |
| 1896 | } |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 1897 | ////////////////////////////////////////////////////////////////////// |
| 1898 | // Pulled atoms below this line // |
| 1899 | ////////////////////////////////////////////////////////////////////// |
| 1900 | |
| 1901 | /** |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 1902 | * Pulls bytes transferred via wifi (Sum of foreground and background usage). |
| 1903 | * |
| 1904 | * Pulled from: |
| 1905 | * StatsCompanionService (using BatteryStats to get which interfaces are wifi) |
| 1906 | */ |
Chenjie Yu | 31d14d7 | 2017-12-12 17:54:33 -0800 | [diff] [blame] | 1907 | message WifiBytesTransfer { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 1908 | optional int32 uid = 1 [(is_uid) = true]; |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 1909 | |
| 1910 | optional int64 rx_bytes = 2; |
| 1911 | |
| 1912 | optional int64 rx_packets = 3; |
| 1913 | |
| 1914 | optional int64 tx_bytes = 4; |
| 1915 | |
| 1916 | optional int64 tx_packets = 5; |
| 1917 | } |
| 1918 | |
| 1919 | /** |
| 1920 | * Pulls bytes transferred via wifi (separated by foreground and background usage). |
| 1921 | * |
| 1922 | * Pulled from: |
| 1923 | * StatsCompanionService (using BatteryStats to get which interfaces are wifi) |
| 1924 | */ |
Chenjie Yu | 31d14d7 | 2017-12-12 17:54:33 -0800 | [diff] [blame] | 1925 | message WifiBytesTransferByFgBg { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 1926 | optional int32 uid = 1 [(is_uid) = true]; |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 1927 | |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 1928 | // 1 denotes foreground and 0 denotes background. This is called Set in NetworkStats. |
| 1929 | optional bool is_foreground = 2; |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 1930 | |
| 1931 | optional int64 rx_bytes = 3; |
| 1932 | |
| 1933 | optional int64 rx_packets = 4; |
| 1934 | |
| 1935 | optional int64 tx_bytes = 5; |
| 1936 | |
| 1937 | optional int64 tx_packets = 6; |
| 1938 | } |
| 1939 | |
| 1940 | /** |
| 1941 | * Pulls bytes transferred via mobile networks (Sum of foreground and background usage). |
| 1942 | * |
| 1943 | * Pulled from: |
| 1944 | * StatsCompanionService (using BatteryStats to get which interfaces are mobile data) |
| 1945 | */ |
Chenjie Yu | 31d14d7 | 2017-12-12 17:54:33 -0800 | [diff] [blame] | 1946 | message MobileBytesTransfer { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 1947 | optional int32 uid = 1 [(is_uid) = true]; |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 1948 | |
| 1949 | optional int64 rx_bytes = 2; |
| 1950 | |
| 1951 | optional int64 rx_packets = 3; |
| 1952 | |
| 1953 | optional int64 tx_bytes = 4; |
| 1954 | |
| 1955 | optional int64 tx_packets = 5; |
| 1956 | } |
| 1957 | |
| 1958 | /** |
| 1959 | * Pulls bytes transferred via mobile networks (separated by foreground and background usage). |
| 1960 | * |
| 1961 | * Pulled from: |
| 1962 | * StatsCompanionService (using BatteryStats to get which interfaces are mobile data) |
| 1963 | */ |
Chenjie Yu | 31d14d7 | 2017-12-12 17:54:33 -0800 | [diff] [blame] | 1964 | message MobileBytesTransferByFgBg { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 1965 | optional int32 uid = 1 [(is_uid) = true]; |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 1966 | |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 1967 | // 1 denotes foreground and 0 denotes background. This is called Set in |
| 1968 | // NetworkStats. |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 1969 | optional bool is_foreground = 2; |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 1970 | |
| 1971 | optional int64 rx_bytes = 3; |
| 1972 | |
| 1973 | optional int64 rx_packets = 4; |
| 1974 | |
| 1975 | optional int64 tx_bytes = 5; |
| 1976 | |
| 1977 | optional int64 tx_packets = 6; |
| 1978 | } |
| 1979 | |
| 1980 | /** |
Chenjie Yu | 9d7720b | 2018-01-24 10:34:48 -0800 | [diff] [blame] | 1981 | * Pulls bytes transferred via bluetooth. It is pulled from Bluetooth controller. |
| 1982 | * |
| 1983 | * Pulled from: |
| 1984 | * StatsCompanionService |
| 1985 | */ |
| 1986 | message BluetoothBytesTransfer { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 1987 | optional int32 uid = 1 [(is_uid) = true]; |
Chenjie Yu | 9d7720b | 2018-01-24 10:34:48 -0800 | [diff] [blame] | 1988 | |
| 1989 | optional int64 rx_bytes = 2; |
| 1990 | |
| 1991 | optional int64 tx_bytes = 3; |
| 1992 | } |
| 1993 | |
| 1994 | /** |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 1995 | * Pulls the kernel wakelock durations. This atom is adapted from |
| 1996 | * android/internal/os/KernelWakelockStats.java |
| 1997 | * |
| 1998 | * Pulled from: |
| 1999 | * StatsCompanionService using KernelWakelockReader. |
| 2000 | */ |
Chenjie Yu | 31d14d7 | 2017-12-12 17:54:33 -0800 | [diff] [blame] | 2001 | message KernelWakelock { |
David Chen | c8a4324 | 2017-10-17 16:23:28 -0700 | [diff] [blame] | 2002 | optional string name = 1; |
| 2003 | |
| 2004 | optional int32 count = 2; |
| 2005 | |
| 2006 | optional int32 version = 3; |
| 2007 | |
| 2008 | optional int64 time = 4; |
| 2009 | } |
Chenjie Yu | 5305e1d | 2017-10-31 13:49:36 -0700 | [diff] [blame] | 2010 | |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 2011 | /** |
Chenjie Yu | c8b7f22 | 2018-01-11 23:25:57 -0800 | [diff] [blame] | 2012 | * Pulls low power state information. This includes platform and subsystem sleep state information, |
| 2013 | * PowerStatePlatformSleepState, PowerStateVoter or PowerStateSubsystemSleepState as defined in |
Chenjie Yu | 5305e1d | 2017-10-31 13:49:36 -0700 | [diff] [blame] | 2014 | * hardware/interfaces/power/1.0/types.hal |
Chenjie Yu | 5305e1d | 2017-10-31 13:49:36 -0700 | [diff] [blame] | 2015 | * hardware/interfaces/power/1.1/types.hal |
| 2016 | */ |
Chenjie Yu | 31d14d7 | 2017-12-12 17:54:33 -0800 | [diff] [blame] | 2017 | message SubsystemSleepState { |
Chenjie Yu | bbcbc60 | 2018-02-05 16:51:52 -0800 | [diff] [blame] | 2018 | // Subsystem name |
| 2019 | optional string subsystem_name = 1; |
| 2020 | // For PlatformLowPowerStats (hal 1.0), this is the voter name, which could be empty. |
| 2021 | // For SubsystemLowPowerStats (hal 1.1), this is the sleep state name. |
| 2022 | optional string subname = 2; |
Chenjie Yu | c8b7f22 | 2018-01-11 23:25:57 -0800 | [diff] [blame] | 2023 | // 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] | 2024 | optional uint64 count = 3; |
Chenjie Yu | c8b7f22 | 2018-01-11 23:25:57 -0800 | [diff] [blame] | 2025 | // 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] | 2026 | optional uint64 time_millis = 4; |
David Chen | 2158296 | 2017-11-01 17:32:46 -0700 | [diff] [blame] | 2027 | } |
Chenjie Yu | 7f8def9 | 2017-11-03 09:33:15 -0700 | [diff] [blame] | 2028 | |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 2029 | /** |
Chenjie Yu | 7f8def9 | 2017-11-03 09:33:15 -0700 | [diff] [blame] | 2030 | * Pulls Cpu time per frequency. |
Chenjie Yu | 1ee9b74 | 2018-01-10 16:02:57 -0800 | [diff] [blame] | 2031 | * Pulls the time the cpu spend on the frequency index. Frequency index |
| 2032 | * starts from highest to lowest. The value should be monotonically |
| 2033 | * increasing since boot. However, if there is a cpu |
| 2034 | * hotplug event, the value would be reset as well. |
Chenjie Yu | 7f8def9 | 2017-11-03 09:33:15 -0700 | [diff] [blame] | 2035 | */ |
Chenjie Yu | 31d14d7 | 2017-12-12 17:54:33 -0800 | [diff] [blame] | 2036 | message CpuTimePerFreq { |
Chenjie Yu | 7f8def9 | 2017-11-03 09:33:15 -0700 | [diff] [blame] | 2037 | optional uint32 cluster = 1; |
| 2038 | optional uint32 freq_index = 2; |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 2039 | optional uint64 time_millis = 3; |
Chenjie Yu | 7f8def9 | 2017-11-03 09:33:15 -0700 | [diff] [blame] | 2040 | } |
Chenjie Yu | e33bc3b | 2017-11-06 17:56:44 -0800 | [diff] [blame] | 2041 | |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 2042 | /** |
Chenjie Yu | e33bc3b | 2017-11-06 17:56:44 -0800 | [diff] [blame] | 2043 | * Pulls Cpu Time Per Uid. |
| 2044 | * Note that isolated process uid time should be attributed to host uids. |
| 2045 | */ |
Chenjie Yu | 31d14d7 | 2017-12-12 17:54:33 -0800 | [diff] [blame] | 2046 | message CpuTimePerUid { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 2047 | optional int32 uid = 1 [(is_uid) = true]; |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 2048 | optional uint64 user_time_millis = 2; |
| 2049 | optional uint64 sys_time_millis = 3; |
Chenjie Yu | e33bc3b | 2017-11-06 17:56:44 -0800 | [diff] [blame] | 2050 | } |
| 2051 | |
| 2052 | /** |
| 2053 | * Pulls Cpu Time Per Uid per frequency. |
| 2054 | * Note that isolated process uid time should be attributed to host uids. |
| 2055 | * For each uid, we order the time by descending frequencies. |
| 2056 | */ |
Chenjie Yu | 31d14d7 | 2017-12-12 17:54:33 -0800 | [diff] [blame] | 2057 | message CpuTimePerUidFreq { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 2058 | optional int32 uid = 1 [(is_uid) = true]; |
Chenjie Yu | ec67661 | 2018-03-07 09:19:17 -0800 | [diff] [blame] | 2059 | optional uint32 freq_index = 2; |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 2060 | optional uint64 time_millis = 3; |
Chenjie Yu | e33bc3b | 2017-11-06 17:56:44 -0800 | [diff] [blame] | 2061 | } |
Hugo Benichi | 884970e | 2017-11-14 22:42:46 +0900 | [diff] [blame] | 2062 | |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 2063 | /** |
| 2064 | * Pulls Wifi Controller Activity Energy Info |
| 2065 | */ |
Chenjie Yu | 5caaa9d | 2018-03-06 15:48:54 -0800 | [diff] [blame] | 2066 | message WifiActivityInfo { |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 2067 | // timestamp(wall clock) of record creation |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 2068 | optional uint64 timestamp_millis = 1; |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 2069 | // stack reported state |
| 2070 | // TODO: replace this with proto enum |
| 2071 | optional int32 stack_state = 2; |
| 2072 | // tx time in ms |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 2073 | optional uint64 controller_tx_time_millis = 3; |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 2074 | // rx time in ms |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 2075 | optional uint64 controller_rx_time_millis = 4; |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 2076 | // idle time in ms |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 2077 | optional uint64 controller_idle_time_millis = 5; |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 2078 | // product of current(mA), voltage(V) and time(ms) |
| 2079 | optional uint64 controller_energy_used = 6; |
| 2080 | } |
| 2081 | |
| 2082 | /** |
| 2083 | * Pulls Modem Activity Energy Info |
| 2084 | */ |
Chenjie Yu | 31d14d7 | 2017-12-12 17:54:33 -0800 | [diff] [blame] | 2085 | message ModemActivityInfo { |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 2086 | // timestamp(wall clock) of record creation |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 2087 | optional uint64 timestamp_millis = 1; |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 2088 | // sleep time in ms. |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 2089 | optional uint64 sleep_time_millis = 2; |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 2090 | // idle time in ms |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 2091 | optional uint64 controller_idle_time_millis = 3; |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 2092 | /** |
| 2093 | * Tx power index |
| 2094 | * index 0 = tx_power < 0dBm |
| 2095 | * index 1 = 0dBm < tx_power < 5dBm |
| 2096 | * index 2 = 5dBm < tx_power < 15dBm |
| 2097 | * index 3 = 15dBm < tx_power < 20dBm |
| 2098 | * index 4 = tx_power > 20dBm |
| 2099 | */ |
| 2100 | // tx time in ms at power level 0 |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 2101 | optional uint64 controller_tx_time_pl0_millis = 4; |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 2102 | // tx time in ms at power level 1 |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 2103 | optional uint64 controller_tx_time_pl1_millis = 5; |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 2104 | // tx time in ms at power level 2 |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 2105 | optional uint64 controller_tx_time_pl2_millis = 6; |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 2106 | // tx time in ms at power level 3 |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 2107 | optional uint64 controller_tx_time_pl3_millis = 7; |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 2108 | // tx time in ms at power level 4 |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 2109 | optional uint64 controller_tx_time_pl4_millis = 8; |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 2110 | // rx time in ms at power level 5 |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 2111 | optional uint64 controller_rx_time_millis = 9; |
Chenjie Yu | 05013b3 | 2017-11-21 10:21:41 -0800 | [diff] [blame] | 2112 | // product of current(mA), voltage(V) and time(ms) |
| 2113 | optional uint64 energy_used = 10; |
Joe Onorato | 62c220b | 2017-11-18 20:32:56 -0800 | [diff] [blame] | 2114 | } |
Rajeev Kumar | 508a9bf | 2018-01-18 15:49:11 -0800 | [diff] [blame] | 2115 | |
Chenjie Yu | 9d7720b | 2018-01-24 10:34:48 -0800 | [diff] [blame] | 2116 | /** |
| 2117 | * Pulls Bluetooth Activity Energy Info |
| 2118 | * Note: BluetoothBytesTransfer is pulled at the same time from the controller. |
| 2119 | */ |
| 2120 | message BluetoothActivityInfo { |
| 2121 | // timestamp(wall clock) of record creation |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 2122 | optional uint64 timestamp_millis = 1; |
Chenjie Yu | 9d7720b | 2018-01-24 10:34:48 -0800 | [diff] [blame] | 2123 | // bluetooth stack state |
| 2124 | optional int32 bluetooth_stack_state = 2; |
| 2125 | // tx time in ms |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 2126 | optional uint64 controller_tx_time_millis = 3; |
Chenjie Yu | 9d7720b | 2018-01-24 10:34:48 -0800 | [diff] [blame] | 2127 | // rx time in ms |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 2128 | optional uint64 controller_rx_time_millis = 4; |
Chenjie Yu | 9d7720b | 2018-01-24 10:34:48 -0800 | [diff] [blame] | 2129 | // idle time in ms |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 2130 | optional uint64 controller_idle_time_millis = 5; |
Chenjie Yu | 9d7720b | 2018-01-24 10:34:48 -0800 | [diff] [blame] | 2131 | // product of current(mA), voltage(V) and time(ms) |
| 2132 | optional uint64 energy_used = 6; |
| 2133 | } |
| 2134 | |
Rajeev Kumar | 508a9bf | 2018-01-18 15:49:11 -0800 | [diff] [blame] | 2135 | /* |
Rajeev Kumar | 8a9fa05 | 2018-01-25 19:03:09 -0800 | [diff] [blame] | 2136 | * Logs the memory stats for a process. |
| 2137 | */ |
| 2138 | message ProcessMemoryState { |
| 2139 | // The uid if available. -1 means not available. |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 2140 | optional int32 uid = 1 [(is_uid) = true]; |
Rajeev Kumar | 8a9fa05 | 2018-01-25 19:03:09 -0800 | [diff] [blame] | 2141 | |
| 2142 | // The process name. |
| 2143 | optional string process_name = 2; |
| 2144 | |
| 2145 | // oom adj score. |
| 2146 | optional int32 oom_score = 3; |
| 2147 | |
| 2148 | // # of page-faults |
| 2149 | optional int64 pgfault = 4; |
| 2150 | |
| 2151 | // # of major page-faults |
| 2152 | optional int64 pgmajfault = 5; |
| 2153 | |
Rajeev Kumar | 9023599 | 2018-01-29 11:06:48 -0800 | [diff] [blame] | 2154 | // RSS |
| 2155 | optional int64 rss_in_bytes = 6; |
| 2156 | |
| 2157 | // CACHE |
| 2158 | optional int64 cache_in_bytes = 7; |
| 2159 | |
| 2160 | // SWAP |
| 2161 | optional int64 swap_in_bytes = 8; |
Rajeev Kumar | 8a9fa05 | 2018-01-25 19:03:09 -0800 | [diff] [blame] | 2162 | } |
| 2163 | |
| 2164 | /* |
Chenjie Yu | 9d7720b | 2018-01-24 10:34:48 -0800 | [diff] [blame] | 2165 | * Elapsed real time from SystemClock. |
Chenjie Yu | 9da105b | 2018-01-13 12:41:08 -0800 | [diff] [blame] | 2166 | */ |
Chenjie Yu | 9d7720b | 2018-01-24 10:34:48 -0800 | [diff] [blame] | 2167 | message SystemElapsedRealtime { |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 2168 | optional uint64 time_millis = 1; |
Chenjie Yu | 9da105b | 2018-01-13 12:41:08 -0800 | [diff] [blame] | 2169 | } |
| 2170 | |
| 2171 | /* |
Chenjie Yu | 9d7720b | 2018-01-24 10:34:48 -0800 | [diff] [blame] | 2172 | * Up time from SystemClock. |
Chenjie Yu | 9da105b | 2018-01-13 12:41:08 -0800 | [diff] [blame] | 2173 | */ |
Chenjie Yu | 9d7720b | 2018-01-24 10:34:48 -0800 | [diff] [blame] | 2174 | message SystemUptime { |
| 2175 | // Milliseconds since the system was booted. |
| 2176 | // This clock stops when the system enters deep sleep (CPU off, display dark, device waiting |
| 2177 | // for external input). |
| 2178 | // 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] | 2179 | optional uint64 uptime_millis = 1; |
Chenjie Yu | 9da105b | 2018-01-13 12:41:08 -0800 | [diff] [blame] | 2180 | } |
| 2181 | |
| 2182 | /* |
| 2183 | * Reads from /proc/uid_concurrent_active_time which has the format: |
| 2184 | * active: X (X is # cores) |
| 2185 | * [uid0]: [time-0] [time-1] [time-2] ... (# entries = # cores) |
| 2186 | * [uid1]: [time-0] [time-1] [time-2] ... ... |
| 2187 | * ... |
| 2188 | * Time-N means the CPU time a UID spent running concurrently with N other processes. |
| 2189 | * The file contains a monotonically increasing count of time for a single boot. |
| 2190 | */ |
| 2191 | message CpuActiveTime { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 2192 | optional int32 uid = 1 [(is_uid) = true]; |
Chenjie Yu | ec67661 | 2018-03-07 09:19:17 -0800 | [diff] [blame] | 2193 | optional uint64 time_millis = 2; |
Chenjie Yu | 9da105b | 2018-01-13 12:41:08 -0800 | [diff] [blame] | 2194 | } |
| 2195 | |
| 2196 | /** |
| 2197 | * Reads from /proc/uid_concurrent_policy_time which has the format: |
| 2198 | * policy0: X policy4: Y (there are X cores on policy0, Y cores on policy4) |
| 2199 | * [uid0]: [time-0-0] [time-0-1] ... [time-1-0] [time-1-1] ... |
| 2200 | * [uid1]: [time-0-0] [time-0-1] ... [time-1-0] [time-1-1] ... |
| 2201 | * ... |
| 2202 | * Time-X-Y means the time a UID spent on clusterX running concurrently with Y other processes. |
| 2203 | * The file contains a monotonically increasing count of time for a single boot. |
| 2204 | */ |
| 2205 | message CpuClusterTime { |
Yao Chen | c40a19d | 2018-03-15 16:48:25 -0700 | [diff] [blame] | 2206 | optional int32 uid = 1 [(is_uid) = true]; |
Chenjie Yu | ec67661 | 2018-03-07 09:19:17 -0800 | [diff] [blame] | 2207 | optional int32 cluster_index = 2; |
David Chen | 0b5c90c | 2018-01-25 16:51:49 -0800 | [diff] [blame] | 2208 | optional uint64 time_millis = 3; |
Chenjie Yu | 937d742 | 2018-01-10 16:37:53 -0800 | [diff] [blame] | 2209 | } |
| 2210 | |
| 2211 | /* |
| 2212 | * Pulls free disk space, for data, system partition and temporary directory. |
| 2213 | */ |
| 2214 | message DiskSpace { |
| 2215 | // available bytes in data partition |
| 2216 | optional uint64 data_available_bytes = 1; |
| 2217 | // available bytes in system partition |
| 2218 | optional uint64 system_available_bytes = 2; |
| 2219 | // available bytes in download cache or temp directories |
| 2220 | optional uint64 temp_available_bytes = 3; |
| 2221 | } |
Tej Singh | bf972d9 | 2018-01-10 20:51:13 -0800 | [diff] [blame] | 2222 | |
| 2223 | /** |
| 2224 | * Pulls battery coulomb counter, which is the remaining battery charge in uAh. |
Tej Singh | 4029831 | 2018-02-16 00:15:09 -0800 | [diff] [blame] | 2225 | * Pulled from: |
| 2226 | * frameworks/base/cmds/statsd/src/external/ResourceHealthManagerPuller.cpp |
Tej Singh | bf972d9 | 2018-01-10 20:51:13 -0800 | [diff] [blame] | 2227 | */ |
| 2228 | message RemainingBatteryCapacity { |
| 2229 | optional int32 charge_uAh = 1; |
| 2230 | } |
| 2231 | |
| 2232 | /** |
| 2233 | * Pulls battery capacity, which is the battery capacity when full in uAh. |
Tej Singh | 4029831 | 2018-02-16 00:15:09 -0800 | [diff] [blame] | 2234 | * Pulled from: |
| 2235 | * frameworks/base/cmds/statsd/src/external/ResourceHealthManagerPuller.cpp |
Tej Singh | bf972d9 | 2018-01-10 20:51:13 -0800 | [diff] [blame] | 2236 | */ |
| 2237 | message FullBatteryCapacity { |
| 2238 | optional int32 capacity_uAh = 1; |
Tej Singh | 4029831 | 2018-02-16 00:15:09 -0800 | [diff] [blame] | 2239 | } |
| 2240 | |
| 2241 | /** |
Bookatz | 17f0d8a | 2018-09-13 12:56:32 -0700 | [diff] [blame] | 2242 | * Pulls battery voltage. |
| 2243 | * Pulled from: |
| 2244 | * frameworks/base/cmds/statsd/src/external/ResourceHealthManagerPuller.cpp |
| 2245 | */ |
| 2246 | message BatteryVoltage { |
| 2247 | // The voltage of the battery, in millivolts. |
| 2248 | optional int32 voltage_mV = 1; |
| 2249 | } |
| 2250 | |
| 2251 | /** |
Tej Singh | d89137e | 2018-03-26 14:51:40 -0700 | [diff] [blame] | 2252 | * Pulls the temperature of various parts of the device. |
| 2253 | * 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] | 2254 | * |
| 2255 | * Pulled from: |
| 2256 | * frameworks/base/cmds/statsd/src/external/ResourceThermalManagerPuller.cpp |
| 2257 | */ |
| 2258 | message Temperature { |
| 2259 | // The type of temperature being reported. Eg. CPU, GPU, SKIN, BATTERY. |
| 2260 | optional android.os.TemperatureTypeEnum sensor_location = 1; |
| 2261 | |
| 2262 | // The name of the temperature source. Eg. CPU0 |
| 2263 | optional string sensor_name = 2; |
| 2264 | |
Tej Singh | d89137e | 2018-03-26 14:51:40 -0700 | [diff] [blame] | 2265 | // Temperature in tenths of a degree C. |
| 2266 | optional int32 temperature_dC = 3; |
yro | a1fe77c | 2018-02-26 14:22:54 -0800 | [diff] [blame] | 2267 | } |
Olivier Gaillard | 00bfb1b | 2018-07-10 11:25:09 +0100 | [diff] [blame] | 2268 | |
| 2269 | /** |
| 2270 | * Pulls the statistics of calls to Binder. |
| 2271 | * |
Olivier Gaillard | d25f7a8 | 2018-09-12 14:28:48 +0100 | [diff] [blame] | 2272 | * Binder stats will be reset every time the data is pulled. It means it can only be pulled by one |
| 2273 | * config on the device. |
Olivier Gaillard | 9ea238d | 2018-07-24 10:26:31 +0100 | [diff] [blame] | 2274 | * |
| 2275 | * Next tag: 14 |
Olivier Gaillard | 00bfb1b | 2018-07-10 11:25:09 +0100 | [diff] [blame] | 2276 | */ |
| 2277 | message BinderCalls { |
Olivier Gaillard | 9ea238d | 2018-07-24 10:26:31 +0100 | [diff] [blame] | 2278 | optional int32 uid = 1 [(is_uid) = true]; |
| 2279 | // Fully qualified class name of the API call. |
| 2280 | // |
| 2281 | // This is a system server class name. |
| 2282 | // |
| 2283 | // TODO(gaillard): figure out if binder call stats includes data from isolated uids, if a uid |
| 2284 | // gets recycled and we have isolated uids, we might attribute the data incorrectly. |
| 2285 | // TODO(gaillard): there is a high dimensions cardinality, figure out if we should drop the less |
| 2286 | // commonly used APIs. |
| 2287 | optional string service_class_name = 2; |
| 2288 | // Method name of the API call. It can also be a transaction code if we cannot |
| 2289 | // resolve it to a name. See Binder#getTransactionName. |
| 2290 | // |
| 2291 | // This is a system server method name. |
| 2292 | optional string service_method_name = 3; |
| 2293 | // Total number of API calls. |
| 2294 | optional int64 call_count = 4; |
| 2295 | // True if the screen was interactive PowerManager#isInteractive at the end of the call. |
| 2296 | optional bool screen_interactive = 13; |
| 2297 | // Total number of API calls we have data recorded for. If we collected data for all the calls, |
| 2298 | // call_count will be equal to recorded_call_count. |
| 2299 | // |
| 2300 | // If recorded_call_count is different than call_count, it means data collection has been |
| 2301 | // sampled. All the fields below will be sampled in this case. |
| 2302 | optional int64 recorded_call_count = 12; |
| 2303 | // Number of exceptions thrown by the API. |
| 2304 | optional int64 recorded_exception_count = 5; |
| 2305 | // Total latency of all API calls. |
| 2306 | // Average can be computed using total_latency_micros / recorded_call_count. |
| 2307 | optional int64 recorded_total_latency_micros = 6; |
| 2308 | // Maximum latency of one API call. |
| 2309 | optional int64 recorded_max_latency_micros = 7; |
| 2310 | // Total CPU usage of all API calls. |
| 2311 | // Average can be computed using total_cpu_micros / recorded_call_count. |
| 2312 | // Total can be computed using total_cpu_micros / recorded_call_count * call_count. |
| 2313 | optional int64 recorded_total_cpu_micros = 8; |
| 2314 | // Maximum CPU usage of one API call. |
| 2315 | optional int64 recorded_max_cpu_micros = 9; |
| 2316 | // Maximum parcel reply size of one API call. |
| 2317 | optional int64 recorded_max_reply_size_bytes = 10; |
| 2318 | // Maximum parcel request size of one API call. |
| 2319 | optional int64 recorded_max_request_size_bytes = 11; |
| 2320 | } |
| 2321 | |
| 2322 | /** |
| 2323 | * Pulls the statistics of exceptions during calls to Binder. |
| 2324 | * |
| 2325 | * Binder stats are cumulative from boot unless somebody reset the data using |
| 2326 | * > adb shell dumpsys binder_calls_stats --reset |
| 2327 | */ |
| 2328 | message BinderCallsExceptions { |
| 2329 | // Exception class name, e.g. java.lang.IllegalArgumentException. |
| 2330 | // |
| 2331 | // This is an exception class name thrown by the system server. |
| 2332 | optional string exception_class_name = 1; |
| 2333 | // Total number of exceptions. |
| 2334 | optional int64 exception_count = 2; |
Olivier Gaillard | 00bfb1b | 2018-07-10 11:25:09 +0100 | [diff] [blame] | 2335 | } |
Marcin Oczeretko | d8cc859 | 2018-08-22 16:07:36 +0100 | [diff] [blame] | 2336 | |
Marcin Oczeretko | 3e6494e | 2018-09-10 18:06:52 +0100 | [diff] [blame] | 2337 | /** |
| 2338 | * Pulls the statistics of message dispatching on HandlerThreads. |
| 2339 | * |
| 2340 | * Looper stats will be reset every time the data is pulled. It means it can only be pulled by one |
| 2341 | * config on the device. |
| 2342 | * |
| 2343 | * Next tag: 11 |
| 2344 | */ |
Marcin Oczeretko | d8cc859 | 2018-08-22 16:07:36 +0100 | [diff] [blame] | 2345 | message LooperStats { |
Marcin Oczeretko | ec75872 | 2018-09-12 12:53:47 +0100 | [diff] [blame] | 2346 | // 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] | 2347 | optional int32 uid = 1 [(is_uid) = true]; |
| 2348 | |
| 2349 | // Fully qualified class name of the handler target class. |
| 2350 | // |
| 2351 | // This field does not contain PII. This is a system server class name. |
| 2352 | optional string handler_class_name = 2; |
| 2353 | |
| 2354 | // The name of the thread that runs the Looper. |
| 2355 | // |
| 2356 | // This field does not contain PII. This is a system server thread name. |
| 2357 | optional string looper_thread_name = 3; |
| 2358 | |
| 2359 | // The name of the dispatched message. |
| 2360 | // |
| 2361 | // This field does not contain PII. This is a system server constant or class |
| 2362 | // name. |
| 2363 | optional string message_name = 4; |
| 2364 | |
| 2365 | // Total number of successfully dispatched messages. |
| 2366 | optional int64 message_count = 5; |
| 2367 | |
| 2368 | // Total number of messages that failed dispatching. |
| 2369 | optional int64 exception_count = 6; |
| 2370 | |
| 2371 | // Total number of processed messages we have data recorded for. If we |
| 2372 | // collected data for all the messages, message_count will be equal to |
| 2373 | // recorded_message_count. |
| 2374 | // |
| 2375 | // If recorded_message_count is different than message_count, it means data |
| 2376 | // collection has been sampled. All the fields below will be sampled in this |
| 2377 | // case. |
| 2378 | optional int64 recorded_message_count = 7; |
| 2379 | |
| 2380 | // Total latency of all processed messages. |
| 2381 | // Average can be computed using recorded_total_latency_micros / |
| 2382 | // recorded_message_count. |
| 2383 | optional int64 recorded_total_latency_micros = 8; |
| 2384 | |
| 2385 | // Total CPU usage of all processed message. |
| 2386 | // Average can be computed using recorded_total_cpu_micros / |
| 2387 | // recorded_message_count. Total can be computed using |
Marcin Oczeretko | 3e6494e | 2018-09-10 18:06:52 +0100 | [diff] [blame] | 2388 | // recorded_total_cpu_micros / recorded_message_count * message_count. |
Marcin Oczeretko | d8cc859 | 2018-08-22 16:07:36 +0100 | [diff] [blame] | 2389 | optional int64 recorded_total_cpu_micros = 9; |
Marcin Oczeretko | 3e6494e | 2018-09-10 18:06:52 +0100 | [diff] [blame] | 2390 | |
| 2391 | // True if the screen was interactive PowerManager#isInteractive at the end of the call. |
| 2392 | optional bool screen_interactive = 10; |
Marcin Oczeretko | d8cc859 | 2018-08-22 16:07:36 +0100 | [diff] [blame] | 2393 | } |
Tej Singh | 86dc9db | 2018-09-06 00:39:57 +0000 | [diff] [blame] | 2394 | |
| 2395 | /** |
| 2396 | * Pulls disk information, such as write speed and latency. |
| 2397 | */ |
| 2398 | message DiskStats { |
| 2399 | // Time taken to open, write 512B to, and close a file. |
| 2400 | // -1 if error performing the check. |
| 2401 | optional int64 data_write_latency_millis = 1; |
| 2402 | |
| 2403 | optional bool file_based_encryption = 2; |
| 2404 | |
| 2405 | // Recent disk write speed in kB/s. |
| 2406 | // -1 if error querying storageed. |
| 2407 | // 0 if data is unavailable. |
| 2408 | optional int32 recent_disk_write_speed = 3; |
| 2409 | } |
| 2410 | |
| 2411 | |
| 2412 | /** |
| 2413 | * Free and total bytes of the Data, Cache, and System partition. |
| 2414 | */ |
| 2415 | message DirectoryUsage { |
| 2416 | enum Directory { |
| 2417 | UNKNOWN = 0; |
| 2418 | DATA = 1; |
| 2419 | CACHE = 2; |
| 2420 | SYSTEM = 3; |
| 2421 | } |
| 2422 | optional Directory directory = 1; |
| 2423 | optional int64 free_bytes = 2; |
| 2424 | optional int64 total_bytes = 3; |
| 2425 | } |
| 2426 | |
| 2427 | |
| 2428 | /** |
| 2429 | * Size of an application: apk size, data size, and cache size. |
| 2430 | * Reads from a cached file produced daily by DiskStatsLoggingService.java. |
| 2431 | * Information is only reported for apps with the primary user (user 0). |
| 2432 | * Sizes are aggregated by package name. |
| 2433 | */ |
| 2434 | message AppSize { |
| 2435 | // Including uids will involve modifying diskstats logic. |
| 2436 | optional string package_name = 1; |
| 2437 | // App size in bytes. -1 if unavailable. |
| 2438 | optional int64 app_size_bytes = 2; |
| 2439 | // App data size in bytes. -1 if unavailable. |
| 2440 | optional int64 app_data_size_bytes = 3; |
| 2441 | // App cache size in bytes. -1 if unavailable. |
| 2442 | optional int64 app_cache_size_bytes = 4; |
| 2443 | // Time that the cache file was produced. |
| 2444 | // Uses System.currentTimeMillis(), which is wall clock time. |
| 2445 | optional int64 cache_time_millis = 5; |
| 2446 | } |
| 2447 | |
| 2448 | |
| 2449 | /** |
| 2450 | * Size of a particular category. Eg: photos, videos. |
| 2451 | * Reads from a cached file produced daily by DiskStatsLoggingService.java. |
| 2452 | */ |
| 2453 | message CategorySize { |
| 2454 | enum Category { |
| 2455 | UNKNOWN = 0; |
| 2456 | APP_SIZE = 1; |
| 2457 | APP_DATA_SIZE = 2; |
| 2458 | APP_CACHE_SIZE = 3; |
| 2459 | PHOTOS = 4; |
| 2460 | VIDEOS = 5; |
| 2461 | AUDIO = 6; |
| 2462 | DOWNLOADS = 7; |
| 2463 | SYSTEM = 8; |
| 2464 | OTHER = 9; |
| 2465 | } |
| 2466 | optional Category category = 1; |
| 2467 | // Category size in bytes. |
| 2468 | optional int64 size_bytes = 2; |
| 2469 | // Time that the cache file was produced. |
| 2470 | // Uses System.currentTimeMillis(), which is wall clock time. |
| 2471 | optional int64 cache_time_millis = 3; |
| 2472 | } |
Tej Singh | d6d6d77 | 2018-09-05 17:41:25 -0700 | [diff] [blame] | 2473 | |
| 2474 | /** |
| 2475 | * Pulls the number of fingerprints for each user. |
| 2476 | * |
| 2477 | * Pulled from StatsCompanionService, which queries FingerprintManager. |
| 2478 | */ |
| 2479 | message NumFingerprints { |
| 2480 | // The associated user. Eg: 0 for owners, 10+ for others. |
| 2481 | // Defined in android/os/UserHandle.java |
| 2482 | optional int32 user = 1; |
| 2483 | // Number of fingerprints registered to that user. |
| 2484 | optional int32 num_fingerprints = 2; |
| 2485 | } |
Chenjie Yu | 12e5e67 | 2018-09-14 15:54:59 -0700 | [diff] [blame] | 2486 | |
| 2487 | /** |
| 2488 | * Pulled from ProcessStatsService.java |
| 2489 | */ |
| 2490 | message ProcStats { |
| 2491 | optional android.service.procstats.ProcessStatsSectionProto proc_stats_section = 1; |
| 2492 | } |