Debian Codegraph @

core/proto/android/server/activitymanagerservice.proto

raw
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";
18
19 package com.android.server.am;
20
21 import "frameworks/base/core/proto/android/app/activitymanager.proto";
22 import "frameworks/base/core/proto/android/app/appexitinfo.proto";
23 import "frameworks/base/core/proto/android/app/notification.proto";
24 import "frameworks/base/core/proto/android/app/profilerinfo.proto";
25 import "frameworks/base/core/proto/android/content/component_name.proto";
26 import "frameworks/base/core/proto/android/content/configuration.proto";
27 import "frameworks/base/core/proto/android/content/intent.proto";
28 import "frameworks/base/core/proto/android/content/package_item_info.proto";
29 import "frameworks/base/core/proto/android/internal/processstats.proto";
30 import "frameworks/base/core/proto/android/os/bundle.proto";
31 import "frameworks/base/core/proto/android/os/looper.proto";
32 import "frameworks/base/core/proto/android/os/powermanager.proto";
33 import "frameworks/base/core/proto/android/server/intentresolver.proto";
34 import "frameworks/base/core/proto/android/server/windowmanagerservice.proto";
35 import "frameworks/base/core/proto/android/util/common.proto";
36 import "frameworks/base/core/proto/android/privacy.proto";
37 import "frameworks/proto_logging/stats/enums/app/enums.proto";
38
39 option java_multiple_files = true;
40
41 message ActivityManagerServiceProto {
42 option (.android.msg_privacy).dest = DEST_AUTOMATIC;
43
44 optional ActivityManagerServiceDumpActivitiesProto activities = 1;
45
46 optional ActivityManagerServiceDumpBroadcastsProto broadcasts = 2;
47
48 optional ActivityManagerServiceDumpServicesProto services = 3;
49
50 optional ActivityManagerServiceDumpProcessesProto processes = 4;
51 }
52
53 // "dumpsys activity --proto activities"
54 message ActivityManagerServiceDumpActivitiesProto {
55 option (.android.msg_privacy).dest = DEST_AUTOMATIC;
56
57 reserved 1; // activity_stack_supervisor
58 optional .com.android.server.wm.RootWindowContainerProto root_window_container = 2;
59 }
60
61 // "dumpsys activity --proto broadcasts"
62 message ActivityManagerServiceDumpBroadcastsProto {
63 option (.android.msg_privacy).dest = DEST_AUTOMATIC;
64
65 repeated ReceiverListProto receiver_list = 1;
66
67 optional .com.android.server.IntentResolverProto receiver_resolver = 2;
68
69 repeated BroadcastQueueProto broadcast_queue = 3;
70
71 repeated StickyBroadcastProto sticky_broadcasts = 4;
72
73 message MainHandler {
74 option (.android.msg_privacy).dest = DEST_AUTOMATIC;
75
76 optional string handler = 1;
77 optional .android.os.LooperProto looper = 2;
78 }
79 optional MainHandler handler = 5;
80 }
81
82 message ReceiverListProto {
83 option (.android.msg_privacy).dest = DEST_AUTOMATIC;
84
85 optional ProcessRecordProto app = 1;
86 optional int32 pid = 2;
87 optional int32 uid = 3;
88 optional int32 user = 4;
89 optional BroadcastRecordProto current = 5;
90 optional bool linked_to_death = 6;
91 repeated BroadcastFilterProto filters = 7;
92 // Used to find this ReceiverList object in IntentResolver
93 optional string hex_hash = 8;
94 }
95
96 message ProcessRecordProto {
97 option (.android.msg_privacy).dest = DEST_AUTOMATIC;
98
99 optional int32 pid = 1;
100 optional string process_name = 2;
101 optional int32 uid = 3;
102 optional int32 user_id = 4;
103 optional int32 app_id = 5;
104 optional int32 isolated_app_id = 6;
105 optional bool persistent = 7;
106 optional int32 lru_index = 8;
107 }
108
109 message BroadcastRecordProto {
110 option (.android.msg_privacy).dest = DEST_AUTOMATIC;
111
112 optional int32 user_id = 1;
113 optional string intent_action = 2;
114 }
115
116 message BroadcastFilterProto {
117 option (.android.msg_privacy).dest = DEST_AUTOMATIC;
118
119 optional .android.content.IntentFilterProto intent_filter = 1;
120 optional string required_permission = 2;
121 // Used to find the BroadcastFilter object in IntentResolver
122 optional string hex_hash = 3;
123 optional int32 owning_user_id = 4;
124 }
125
126 message BroadcastQueueProto {
127 option (.android.msg_privacy).dest = DEST_AUTOMATIC;
128
129 optional string queue_name = 1;
130 repeated BroadcastRecordProto parallel_broadcasts = 2;
131 repeated BroadcastRecordProto ordered_broadcasts = 3;
132 optional BroadcastRecordProto pending_broadcast = 4;
133 repeated BroadcastRecordProto historical_broadcasts = 5;
134
135 message BroadcastSummary {
136 option (.android.msg_privacy).dest = DEST_AUTOMATIC;
137
138 optional .android.content.IntentProto intent = 1;
139 optional int64 enqueue_clock_time_ms = 2;
140 optional int64 dispatch_clock_time_ms = 3;
141 optional int64 finish_clock_time_ms = 4;
142 }
143 repeated BroadcastSummary historical_broadcasts_summary = 6;
144 }
145
146 message MemInfoDumpProto {
147 option (.android.msg_privacy).dest = DEST_AUTOMATIC;
148
149 optional int64 uptime_duration_ms = 1;
150 optional int64 elapsed_realtime_ms = 2;
151
152 message ProcessMemory {
153 option (.android.msg_privacy).dest = DEST_AUTOMATIC;
154
155 optional int32 pid = 1;
156 optional string process_name = 2;
157
158 message MemoryInfo {
159 option (.android.msg_privacy).dest = DEST_AUTOMATIC;
160
161 optional string name = 1;
162 // The proportional set size for the heap.
163 optional int32 total_pss_kb = 2;
164 // The proportional set size that is swappable for the heap.
165 optional int32 clean_pss_kb = 3;
166 // The private dirty pages used by the heap.
167 optional int32 shared_dirty_kb = 4;
168 // The shared dirty pages used by the heap.
169 optional int32 private_dirty_kb = 5;
170 // The shared clean pages used by the heap.
171 optional int32 shared_clean_kb = 6;
172 // The private clean pages used by the heap.
173 optional int32 private_clean_kb = 7;
174 oneof dirty_swap {
175 // The dirty the pages that have been swapped out.
176 int32 dirty_swap_kb = 8;
177 // The dirty the pages that have been swapped out, proportional.
178 int32 dirty_swap_pss_kb = 9;
179 }
180 // The rss set size for the heap.
181 optional int32 total_rss_kb = 10;
182 }
183 message HeapInfo {
184 option (.android.msg_privacy).dest = DEST_AUTOMATIC;
185
186 optional MemoryInfo mem_info = 1;
187 optional int32 heap_size_kb = 2;
188 optional int32 heap_alloc_kb = 3;
189 optional int32 heap_free_kb = 4;
190 }
191 optional HeapInfo native_heap = 3;
192 optional HeapInfo dalvik_heap = 4;
193 repeated MemoryInfo other_heaps = 5;
194 optional MemoryInfo unknown_heap = 6;
195 // Summation of native_heap, dalvik_heap, and other_heaps.
196 optional HeapInfo total_heap = 7;
197
198 repeated MemoryInfo dalvik_details = 8;
199
200 message AppSummary {
201 option (.android.msg_privacy).dest = DEST_AUTOMATIC;
202
203 optional int32 java_heap_pss_kb = 1;
204 optional int32 native_heap_pss_kb = 2;
205 optional int32 code_pss_kb = 3;
206 optional int32 stack_pss_kb = 4;
207 optional int32 graphics_pss_kb = 5;
208 optional int32 private_other_pss_kb = 6;
209 optional int32 system_pss_kb = 7;
210
211 oneof total_swap {
212 int32 total_swap_pss = 8;
213 int32 total_swap_kb = 9;
214 }
215 optional int32 java_heap_rss_kb = 10;
216 optional int32 native_heap_rss_kb = 11;
217 optional int32 code_rss_kb = 12;
218 optional int32 stack_rss_kb = 13;
219 optional int32 graphics_rss_kb = 14;
220 optional int32 unknown_rss_kb = 15;
221 }
222 optional AppSummary app_summary = 9;
223 }
224 repeated ProcessMemory native_processes = 3;
225
226 message AppData {
227 option (.android.msg_privacy).dest = DEST_AUTOMATIC;
228
229 optional ProcessMemory process_memory = 1;
230
231 message ObjectStats {
232 option (.android.msg_privacy).dest = DEST_AUTOMATIC;
233
234 optional int32 view_instance_count = 1;
235 optional int32 view_root_instance_count = 2;
236 optional int32 app_context_instance_count = 3;
237 optional int32 activity_instance_count = 4;
238 optional int32 global_asset_count = 5;
239 optional int32 global_asset_manager_count = 6;
240 optional int32 local_binder_object_count = 7;
241 optional int32 proxy_binder_object_count = 8;
242 optional int64 parcel_memory_kb = 9;
243 optional int32 parcel_count = 10;
244 optional int32 binder_object_death_count = 11;
245 optional int32 open_ssl_socket_count = 12;
246 optional int32 webview_instance_count = 13;
247 }
248 optional ObjectStats objects = 2;
249
250 message SqlStats {
251 option (.android.msg_privacy).dest = DEST_AUTOMATIC;
252
253 optional int32 memory_used_kb = 1;
254 optional int32 pagecache_overflow_kb = 2;
255 optional int32 malloc_size_kb = 3;
256
257 message Database {
258 option (.android.msg_privacy).dest = DEST_AUTOMATIC;
259
260 optional string name = 1;
261 optional int32 page_size = 2;
262 optional int32 db_size = 3;
263 // Number of lookaside slots:
264 // http://www.sqlite.org/c3ref/c_dbstatus_lookaside_used.html
265 optional int32 lookaside_b = 4;
266 // Statement cache stats: hits/misses/cachesize
267 optional string cache = 5;
268 }
269 repeated Database databases = 4;
270 }
271 optional SqlStats sql = 3;
272
273 optional string asset_allocations = 4;
274 optional string unreachable_memory = 5;
275 }
276 repeated AppData app_processes = 4;
277
278 message MemItem {
279 option (.android.msg_privacy).dest = DEST_AUTOMATIC;
280
281 optional string tag = 1;
282 optional string label = 2;
283 optional int32 id = 3;
284 optional bool is_proc = 4;
285 optional bool has_activities = 5;
286 optional int64 pss_kb = 6;
287 optional int64 rss_kb = 9;
288 optional int64 swap_pss_kb = 7;
289 repeated MemItem sub_items = 8;
290 }
291 repeated MemItem total_rss_by_process = 29;
292 repeated MemItem total_rss_by_oom_adjustment = 30;
293 repeated MemItem total_rss_by_category = 31;
294 repeated MemItem total_pss_by_process = 5;
295 repeated MemItem total_pss_by_oom_adjustment = 6;
296 repeated MemItem total_pss_by_category = 7;
297
298 optional int64 total_ram_kb = 8;
299 optional .com.android.internal.app.procstats.ProcessStatsProto.MemoryFactor status = 9;
300 // Total free RAM = cached_pss_kb + cached_kernel_kb + free_kb.
301 optional int64 cached_pss_kb = 10;
302 optional int64 cached_kernel_kb = 11;
303 optional int64 free_kb = 12;
304 // Total used RAM = used_pss_kb + used_kernel_kb.
305 optional int64 used_pss_kb = 13;
306 optional int64 used_kernel_kb = 14;
307
308 optional int64 lost_ram_kb = 15;
309
310 optional int64 total_zram_kb = 16;
311 optional int64 zram_physical_used_in_swap_kb = 17;
312 optional int64 total_zram_swap_kb = 18;
313
314 optional int64 ksm_sharing_kb = 19;
315 optional int64 ksm_shared_kb = 20;
316 optional int64 ksm_unshared_kb = 21;
317 optional int64 ksm_volatile_kb = 22;
318
319 // The approximate per-application memory class of the current device. This
320 // gives developers an idea of how hard a memory limit you should impose on
321 // their application to let the overall system work best. The value is in
322 // megabytes; the baseline Android memory class is 16 (which happens to be the
323 // Java heap limit of those devices); some devices with more memory may have
324 // 24 or even higher numbers.
325 optional int32 tuning_mb = 23;
326 // The approximate per-application memory class of the current device when an
327 // application is running with a large heap. This is the space available for
328 // memory-intensive applications; most applications should not need this
329 // amount of memory, and should instead stay with the tuning_mb limit. The
330 // value is in megabytes. This may be the same size as tuning_mb on memory
331 // constrained devices, or it may be significantly larger on devices with a
332 // large amount of available RAM.
333 // This is the size of the application's Dalvik heap if it has specified
334 // 'android:largeHeap="true"' in its manifest.
335 optional int32 tuning_large_mb = 24;
336
337 optional int64 oom_kb = 25;
338
339 // The maximum pss size in kb that we consider a process acceptable to restore
340 // from its cached state for running in the background when RAM is low.
341 optional int64 restore_limit_kb = 26;
342
343 optional bool is_low_ram_device = 27;
344 optional bool is_high_end_gfx = 28;
345
346 // Next Tag: 32
347 }
348
349 message StickyBroadcastProto {
350 option (.android.msg_privacy).dest = DEST_AUTOMATIC;
351
352 optional int32 user = 1;
353
354 message StickyAction {
355 option (.android.msg_privacy).dest = DEST_AUTOMATIC;
356
357 // The action of the sticky Intent.
358 optional string name = 1;
359 repeated .android.content.IntentProto intents = 2;
360 }
361 repeated StickyAction actions = 2;
362 }
363
364 // "dumpsys activity --proto service"
365 message ActivityManagerServiceDumpServicesProto {
366 option (.android.msg_privacy).dest = DEST_AUTOMATIC;
367
368 optional ActiveServicesProto active_services = 1;
369 }
370
371 message ActiveServicesProto {
372 option (.android.msg_privacy).dest = DEST_AUTOMATIC;
373
374 message ServicesByUser {
375 option (.android.msg_privacy).dest = DEST_AUTOMATIC;
376
377 optional int32 user_id = 1;
378 repeated ServiceRecordProto service_records = 2;
379 }
380 repeated ServicesByUser services_by_users = 1;
381 }
382
383 // corresponds to ActivityManagerService.GrantUri Java class
384 message GrantUriProto {
385 option (.android.msg_privacy).dest = DEST_AUTOMATIC;
386
387 optional int32 source_user_id = 1;
388 optional string uri = 2 [ (.android.privacy).dest = DEST_EXPLICIT ];
389 }
390
391 message NeededUriGrantsProto {
392 option (.android.msg_privacy).dest = DEST_AUTOMATIC;
393
394 optional string target_package = 1;
395 optional int32 target_uid = 2;
396 optional int32 flags = 3;
397
398 repeated GrantUriProto grants = 4;
399 }
400
401 message UriPermissionOwnerProto {
402 option (.android.msg_privacy).dest = DEST_EXPLICIT;
403
404 optional string owner = 1;
405 repeated GrantUriProto read_perms = 2;
406 repeated GrantUriProto write_perms = 3;
407 }
408
409 message ServiceRecordProto {
410 option (.android.msg_privacy).dest = DEST_AUTOMATIC;
411
412 optional string short_name = 1;
413 optional bool is_running = 2; // false if the application service is null
414 optional int32 pid = 3;
415 optional .android.content.IntentProto intent = 4;
416 optional string package_name = 5;
417 optional string process_name = 6;
418 optional string permission = 7;
419
420 message AppInfo {
421 option (.android.msg_privacy).dest = DEST_EXPLICIT;
422
423 optional string base_dir = 1;
424 optional string res_dir = 2;
425 optional string data_dir = 3;
426 }
427 optional AppInfo appinfo = 8;
428 optional ProcessRecordProto app = 9;
429 optional ProcessRecordProto isolated_proc = 10;
430 optional bool whitelist_manager = 11;
431 optional bool delayed = 12;
432
433 message Foreground {
434 option (.android.msg_privacy).dest = DEST_AUTOMATIC;
435
436 optional int32 id = 1;
437 optional .android.app.NotificationProto notification = 2;
438 }
439 optional Foreground foreground = 13;
440
441 optional .android.util.Duration create_real_time = 14;
442 optional .android.util.Duration starting_bg_timeout = 15;
443 optional .android.util.Duration last_activity_time = 16;
444 optional .android.util.Duration restart_time = 17;
445 optional bool created_from_fg = 18;
446
447 // variables used to track states related to service start
448 message Start {
449 option (.android.msg_privacy).dest = DEST_AUTOMATIC;
450
451 optional bool start_requested = 1;
452 optional bool delayed_stop = 2;
453 optional bool stop_if_killed = 3;
454 optional bool call_start = 4;
455 optional int32 last_start_id = 5;
456 }
457 optional Start start = 19;
458
459 message ExecuteNesting {
460 option (.android.msg_privacy).dest = DEST_AUTOMATIC;
461
462 optional int32 execute_nesting = 1;
463 optional bool execute_fg = 2;
464 optional .android.util.Duration executing_start = 3;
465 }
466 optional ExecuteNesting execute = 20;
467
468 optional .android.util.Duration destory_time = 21;
469
470 message Crash {
471 option (.android.msg_privacy).dest = DEST_AUTOMATIC;
472
473 optional int32 restart_count = 1;
474 optional .android.util.Duration restart_delay = 2;
475 optional .android.util.Duration next_restart_time = 3;
476 optional int32 crash_count = 4;
477 }
478 optional Crash crash = 22;
479
480 message StartItem {
481 option (.android.msg_privacy).dest = DEST_AUTOMATIC;
482
483 optional int32 id = 1;
484 optional .android.util.Duration duration = 2;
485 optional int32 delivery_count = 3;
486 optional int32 done_executing_count = 4;
487 optional .android.content.IntentProto intent = 5;
488 optional NeededUriGrantsProto needed_grants = 6;
489 optional UriPermissionOwnerProto uri_permissions = 7;
490 }
491 repeated StartItem delivered_starts = 23;
492 repeated StartItem pending_starts = 24;
493
494 repeated IntentBindRecordProto bindings = 25;
495 repeated ConnectionRecordProto connections = 26;
496
497 optional bool allow_while_in_use_permission_in_fgs = 27;
498 // Next Tag: 28
499 }
500
501 message ConnectionRecordProto {
502 option (.android.msg_privacy).dest = DEST_AUTOMATIC;
503
504 // Used to find same record, e.g. AppBindRecord has the hex_hash
505 optional string hex_hash = 1; // cross reference the object and avoid double logging.
506 optional int32 user_id = 2;
507
508 enum Flag {
509 AUTO_CREATE = 0;
510 DEBUG_UNBIND = 1;
511 NOT_FG = 2;
512 IMPORTANT_BG = 3;
513 ABOVE_CLIENT = 4;
514 ALLOW_OOM_MANAGEMENT = 5;
515 WAIVE_PRIORITY = 6;
516 IMPORTANT = 7;
517 ADJUST_WITH_ACTIVITY = 8;
518 FG_SERVICE_WHILE_AWAKE = 9;
519 FG_SERVICE = 10;
520 TREAT_LIKE_ACTIVITY = 11;
521 VISIBLE = 12;
522 SHOWING_UI = 13;
523 NOT_VISIBLE = 14;
524 DEAD = 15;
525 NOT_PERCEPTIBLE = 16;
526 INCLUDE_CAPABILITIES = 17;
527 }
528 repeated Flag flags = 3;
529 optional string service_name = 4;
530 }
531
532 message AppBindRecordProto {
533 option (.android.msg_privacy).dest = DEST_AUTOMATIC;
534
535 optional string service_name = 1;
536 optional string client_proc_name = 2;
537 repeated string connections = 3; // hex_hash of ConnectionRecordProto
538 }
539
540 message IntentBindRecordProto {
541 option (.android.msg_privacy).dest = DEST_AUTOMATIC;
542
543 optional .android.content.IntentProto intent = 1;
544 optional string binder = 2;
545 optional bool auto_create = 3; // value of BIND_AUTO_CREATE flag.
546 optional bool requested = 4;
547 optional bool received = 5;
548 optional bool has_bound = 6;
549 optional bool do_rebind = 7;
550
551 repeated AppBindRecordProto apps = 8;
552 }
553
554 // TODO: "dumpsys activity --proto processes"
555 message ActivityManagerServiceDumpProcessesProto {
556 option (.android.msg_privacy).dest = DEST_AUTOMATIC;
557
558 repeated ProcessRecordProto procs = 1;
559 repeated ProcessRecordProto isolated_procs = 2;
560 repeated ActiveInstrumentationProto active_instrumentations = 3;
561 repeated UidRecordProto active_uids = 4;
562 repeated UidRecordProto validate_uids = 5;
563
564 // Process LRU list (sorted by oom_adj)
565 message LruProcesses {
566 option (.android.msg_privacy).dest = DEST_AUTOMATIC;
567
568 optional int32 size = 1;
569 optional int32 non_act_at = 2;
570 optional int32 non_svc_at = 3;
571 repeated ProcessOomProto list = 4;
572 }
573 optional LruProcesses lru_procs = 6;
574 repeated ProcessRecordProto pids_self_locked = 7;
575 // Foreground Processes
576 repeated ImportanceTokenProto important_procs = 8;
577 // Persisent processes that are starting
578 repeated ProcessRecordProto persistent_starting_procs = 9;
579 // Processes that are being removed
580 repeated ProcessRecordProto removed_procs = 10;
581 // Processes that are on old until the system is ready
582 repeated ProcessRecordProto on_hold_procs = 11;
583 // Processes that are waiting to GC
584 repeated ProcessToGcProto gc_procs = 12;
585 optional AppErrorsProto app_errors = 13;
586 optional UserControllerProto user_controller = 14;
587 optional ProcessRecordProto home_proc = 15;
588 optional ProcessRecordProto previous_proc = 16;
589 optional int64 previous_proc_visible_time_ms = 17;
590 optional ProcessRecordProto heavy_weight_proc = 18;
591 optional .android.content.ConfigurationProto global_configuration = 19;
592
593 optional bool config_will_change = 21;
594
595 message ScreenCompatPackage {
596 option (.android.msg_privacy).dest = DEST_AUTOMATIC;
597
598 optional string package = 1;
599 optional int32 mode = 2;
600 }
601 repeated ScreenCompatPackage screen_compat_packages = 22;
602
603 message UidObserverRegistrationProto {
604 option (.android.msg_privacy).dest = DEST_AUTOMATIC;
605
606 optional int32 uid = 1;
607 optional string package = 2;
608 repeated .android.app.UidObserverFlag flags = 3;
609 optional int32 cut_point = 4; // only available when UID_OBSERVER_PROCSTATE is on
610
611 message ProcState {
612 option (.android.msg_privacy).dest = DEST_AUTOMATIC;
613
614 optional int32 uid = 1;
615 optional int32 state = 2;
616 }
617 repeated ProcState last_proc_states = 5;
618 }
619 repeated UidObserverRegistrationProto uid_observers = 23;
620 repeated int32 device_idle_whitelist = 24;
621 repeated int32 device_idle_temp_whitelist = 25;
622
623 message PendingTempWhitelist {
624 option (.android.msg_privacy).dest = DEST_AUTOMATIC;
625
626 optional int32 target_uid = 1;
627 optional int64 duration_ms = 2;
628 optional string tag = 3;
629 optional int32 type = 4;
630 optional int32 reason_code = 5;
631 optional int32 calling_uid = 6;
632 }
633 repeated PendingTempWhitelist pending_temp_whitelist = 26;
634
635 message SleepStatus {
636 option (.android.msg_privacy).dest = DEST_AUTOMATIC;
637
638 optional .android.os.PowerManagerInternalProto.Wakefulness wakefulness = 1;
639 repeated string sleep_tokens = 2 [ (.android.privacy).dest = DEST_EXPLICIT ];
640 optional bool sleeping = 3;
641 optional bool shutting_down = 4;
642 optional bool test_pss_mode = 5;
643 }
644 optional SleepStatus sleep_status = 27;
645
646 message Voice {
647 option (.android.msg_privacy).dest = DEST_AUTOMATIC;
648
649 optional string session = 1;
650 optional .android.os.PowerManagerProto.WakeLock wakelock = 2;
651 }
652 optional Voice running_voice = 28;
653
654 optional VrControllerProto vr_controller = 29;
655
656 message DebugApp {
657 option (.android.msg_privacy).dest = DEST_AUTOMATIC;
658
659 optional string debug_app = 1;
660 optional string orig_debug_app = 2;
661 optional bool debug_transient = 3;
662 optional bool orig_wait_for_debugger = 4;
663 }
664 optional DebugApp debug = 30;
665 optional AppTimeTrackerProto current_tracker = 31;
666
667 message MemWatchProcess {
668 option (.android.msg_privacy).dest = DEST_AUTOMATIC;
669
670 message Process {
671 option (.android.msg_privacy).dest = DEST_AUTOMATIC;
672
673 optional string name = 1;
674
675 message MemStats {
676 option (.android.msg_privacy).dest = DEST_AUTOMATIC;
677
678 optional int32 uid = 1;
679 optional string size = 2;
680 optional string report_to = 3;
681 }
682 repeated MemStats mem_stats = 2;
683 }
684 repeated Process procs = 1;
685
686 message Dump {
687 option (.android.msg_privacy).dest = DEST_AUTOMATIC;
688
689 optional string proc_name = 1;
690 reserved 2; // file, DEST_EXPLICIT
691 optional int32 pid = 3;
692 optional int32 uid = 4;
693 optional bool is_user_initiated = 5;
694 optional string uri = 6 [ (.android.privacy).dest = DEST_EXPLICIT ];
695 }
696 optional Dump dump = 2;
697 }
698 optional MemWatchProcess mem_watch_processes = 32;
699 optional string track_allocation_app = 33;
700
701 message Profile {
702 option (.android.msg_privacy).dest = DEST_AUTOMATIC;
703
704 optional string app_name = 1;
705 optional ProcessRecordProto proc = 2;
706 optional .android.app.ProfilerInfoProto info = 3;
707 optional int32 type = 4;
708 }
709 optional Profile profile = 34;
710 optional string native_debugging_app = 35;
711 optional bool always_finish_activities = 36;
712
713 message Controller {
714 option (.android.msg_privacy).dest = DEST_AUTOMATIC;
715
716 optional string controller = 1;
717 optional bool is_a_monkey = 2;
718 }
719 optional Controller controller = 37;
720
721 optional int32 total_persistent_procs = 38;
722 optional bool processes_ready = 39;
723 optional bool system_ready = 40;
724 optional bool booted = 41;
725 optional int32 factory_test = 42;
726 optional bool booting = 43;
727 optional bool call_finish_booting = 44;
728 optional bool boot_animation_complete = 45;
729 optional int64 last_power_check_uptime_ms = 46;
730 optional .android.os.PowerManagerProto.WakeLock going_to_sleep = 47;
731 optional .android.os.PowerManagerProto.WakeLock launching_activity = 48;
732 optional int32 adj_seq = 49;
733 optional int32 lru_seq = 50;
734 optional int32 num_non_cached_procs = 51;
735 optional int32 num_cached_hidden_procs = 52;
736 optional int32 num_service_procs = 53;
737 optional int32 new_num_service_procs = 54;
738 optional bool allow_lower_mem_level = 55;
739 optional int32 last_memory_level = 56;
740 optional int32 last_num_processes = 57;
741 optional .android.util.Duration last_idle_time = 58;
742 optional int64 low_ram_since_last_idle_ms = 59;
743 }
744
745 message ActiveInstrumentationProto {
746 option (.android.msg_privacy).dest = DEST_AUTOMATIC;
747
748 optional .android.content.ComponentNameProto class = 1;
749 optional bool finished = 2;
750 repeated ProcessRecordProto running_processes = 3;
751 repeated string target_processes = 4;
752 optional .android.content.pm.ApplicationInfoProto target_info = 5;
753 optional string profile_file = 6;
754 optional string watcher = 7;
755 optional string ui_automation_connection = 8;
756 // Arguments as given to the ActiveInstrumentation object in Bundle
757 // toString format.
758 reserved 9; // arguments (in String format).
759 // Arguments as given to the ActiveInstrumentation object.
760 optional .android.os.BundleProto arguments = 10;
761 }
762
763 // Proto definition of com.android.server.am.UidRecord.java
764 message UidRecordProto {
765 option (.android.msg_privacy).dest = DEST_AUTOMATIC;
766
767 optional int32 uid = 1;
768 optional .android.app.ProcessStateEnum current = 2;
769 optional bool ephemeral = 3;
770 optional bool fg_services = 4;
771 optional bool whilelist = 5;
772 optional .android.util.Duration last_background_time = 6;
773 optional bool idle = 7;
774
775 enum Change {
776 CHANGE_GONE = 0;
777 CHANGE_IDLE = 1;
778 CHANGE_ACTIVE = 2;
779 CHANGE_CACHED = 3;
780 CHANGE_UNCACHED = 4;
781 CHANGE_CAPABILITY = 5;
782 CHANGE_PROCSTATE = 6;
783 CHANGE_PROCADJ = 7;
784 }
785 repeated Change last_reported_changes = 8;
786 optional int32 num_procs = 9;
787
788 message ProcStateSequence {
789 option (.android.msg_privacy).dest = DEST_AUTOMATIC;
790
791 optional int64 cururent = 1;
792 optional int64 last_network_updated = 2;
793 optional int64 last_dispatched = 3;
794 }
795 optional ProcStateSequence network_state_update = 10;
796
797 // Next Tag: 11
798 }
799
800 // proto of class ImportanceToken in ActivityManagerService
801 message ImportanceTokenProto {
802 option (.android.msg_privacy).dest = DEST_EXPLICIT;
803
804 optional int32 pid = 1;
805 optional string token = 2;
806 optional string reason = 3;
807 }
808
809 // proto of class VrController.java
810 message VrControllerProto {
811 option (.android.msg_privacy).dest = DEST_AUTOMATIC;
812
813 enum VrMode {
814 FLAG_NON_VR_MODE = 0;
815 FLAG_VR_MODE = 1;
816 FLAG_PERSISTENT_VR_MODE = 2;
817 }
818 repeated VrMode vr_mode = 1;
819 optional int32 render_thread_id = 2;
820 }
821
822 message ProcessOomProto {
823 option (.android.msg_privacy).dest = DEST_AUTOMATIC;
824
825 optional bool persistent = 1;
826 optional int32 num = 2;
827 optional string oom_adj = 3;
828
829 // Activity manager's version of Process enum, see ProcessList.java
830 enum SchedGroup {
831 SCHED_GROUP_UNKNOWN = -1;
832 SCHED_GROUP_BACKGROUND = 0;
833 SCHED_GROUP_DEFAULT = 1;
834 SCHED_GROUP_TOP_APP = 2;
835 SCHED_GROUP_TOP_APP_BOUND = 3;
836 }
837 optional SchedGroup sched_group = 4 [ default = SCHED_GROUP_UNKNOWN];
838
839 oneof Foreground {
840 bool activities = 5;
841 bool services = 6;
842 }
843
844 optional .android.app.ProcessStateEnum state = 7;
845 optional int32 trim_memory_level = 8;
846 optional ProcessRecordProto proc = 9;
847 optional string adj_type = 10;
848
849 oneof AdjTarget {
850 .android.content.ComponentNameProto adj_target_component_name = 11;
851 string adj_target_object = 12;
852 }
853
854 oneof AdjSource {
855 ProcessRecordProto adj_source_proc = 13;
856 string adj_source_object = 14;
857 }
858
859 message Detail {
860 option (.android.msg_privacy).dest = DEST_AUTOMATIC;
861
862 optional int32 max_adj = 1;
863 optional int32 cur_raw_adj = 2;
864 optional int32 set_raw_adj = 3;
865 optional int32 cur_adj = 4;
866 optional int32 set_adj = 5;
867 optional .android.app.ProcessStateEnum current_state = 7;
868 optional .android.app.ProcessStateEnum set_state = 8;
869 optional string last_pss = 9;
870 optional string last_swap_pss = 10;
871 optional string last_cached_pss = 11;
872 optional bool cached = 12;
873 optional bool empty = 13;
874 optional bool has_above_client = 14;
875
876 // only make sense if process is a service
877 message CpuRunTime {
878 option (.android.msg_privacy).dest = DEST_AUTOMATIC;
879
880 optional int64 over_ms = 1;
881 optional int64 used_ms = 2;
882 optional float ultilization = 3; // ratio of cpu time usage
883 }
884 optional CpuRunTime service_run_time = 15;
885 }
886 optional Detail detail = 15;
887 }
888
889 message ProcessToGcProto {
890 option (.android.msg_privacy).dest = DEST_AUTOMATIC;
891
892 optional ProcessRecordProto proc = 1;
893 optional bool report_low_memory = 2;
894 optional int64 now_uptime_ms = 3;
895 optional int64 last_gced_ms = 4;
896 optional int64 last_low_memory_ms = 5;
897 }
898
899 // sync with com.android.server.am.AppErrors.java
900 message AppErrorsProto {
901 option (.android.msg_privacy).dest = DEST_AUTOMATIC;
902
903 optional int64 now_uptime_ms = 1;
904
905 message ProcessCrashTime {
906 option (.android.msg_privacy).dest = DEST_AUTOMATIC;
907
908 optional string process_name = 1;
909
910 message Entry {
911 option (.android.msg_privacy).dest = DEST_AUTOMATIC;
912
913 optional int32 uid = 1;
914 optional int64 last_crashed_at_ms = 2;
915 }
916 repeated Entry entries = 2;
917 }
918 repeated ProcessCrashTime process_crash_times = 2;
919
920 message BadProcess {
921 option (.android.msg_privacy).dest = DEST_AUTOMATIC;
922
923 optional string process_name = 1;
924
925 message Entry {
926 option (.android.msg_privacy).dest = DEST_AUTOMATIC;
927
928 optional int32 uid = 1;
929 optional int64 crashed_at_ms = 2;
930 optional string short_msg = 3;
931 optional string long_msg = 4 [ (.android.privacy).dest = DEST_EXPLICIT ];
932 optional string stack = 5 [ (.android.privacy).dest = DEST_EXPLICIT ];
933 }
934 repeated Entry entries = 2;
935 }
936 repeated BadProcess bad_processes = 3;
937 }
938
939 // sync with com.android.server.am.UserState.java
940 message UserStateProto {
941 option (.android.msg_privacy).dest = DEST_AUTOMATIC;
942
943 enum State {
944 STATE_BOOTING = 0;
945 STATE_RUNNING_LOCKED = 1;
946 STATE_RUNNING_UNLOCKING = 2;
947 STATE_RUNNING_UNLOCKED = 3;
948 STATE_STOPPING = 4;
949 STATE_SHUTDOWN = 5;
950 }
951 optional State state = 1;
952 optional bool switching = 2;
953 }
954
955 // sync with com.android.server.am.UserController.java
956 message UserControllerProto {
957 option (.android.msg_privacy).dest = DEST_AUTOMATIC;
958
959 message User {
960 option (.android.msg_privacy).dest = DEST_AUTOMATIC;
961
962 optional int32 id = 1;
963 optional UserStateProto state = 2;
964 }
965 repeated User started_users = 1;
966 repeated int32 started_user_array = 2;
967 repeated int32 user_lru = 3;
968
969 message UserProfile {
970 option (.android.msg_privacy).dest = DEST_AUTOMATIC;
971
972 optional int32 user = 1;
973 optional int32 profile = 2;
974 }
975 repeated UserProfile user_profile_group_ids = 4;
976 }
977
978 // sync with com.android.server.am.AppTimeTracker.java
979 message AppTimeTrackerProto {
980 option (.android.msg_privacy).dest = DEST_AUTOMATIC;
981
982 optional string receiver = 1;
983 optional int64 total_duration_ms = 2;
984
985 message PackageTime {
986 option (.android.msg_privacy).dest = DEST_AUTOMATIC;
987
988 optional string package = 1;
989 optional int64 duration_ms = 2;
990 }
991 repeated PackageTime package_times = 3;
992
993 optional .android.util.Duration started_time = 4;
994 optional string started_package = 5;
995 }
996
997 // sync with com.android.server.am.am.ProcessList.java
998 message AppsExitInfoProto {
999 option (.android.msg_privacy).dest = DEST_AUTOMATIC;
1000
1001 optional int64 last_update_timestamp = 1;
1002 message Package {
1003 option (.android.msg_privacy).dest = DEST_AUTOMATIC;
1004
1005 optional string package_name = 1;
1006 message User {
1007 option (.android.msg_privacy).dest = DEST_AUTOMATIC;
1008
1009 optional int32 uid = 1;
1010 repeated .android.app.ApplicationExitInfoProto app_exit_info = 2;
1011 repeated .android.app.ApplicationExitInfoProto app_recoverable_crash = 3;
1012 }
1013 repeated User users = 2;
1014 }
1015 repeated Package packages = 2;
1016 }