blob: f8050a15e78ea7098cbe25993d3376e490903c2f [file] [log] [blame]
Netta P426cbef2017-02-10 14:38:39 -08001/*
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
Yi Jinc7f93072017-09-29 15:29:38 -070017syntax = "proto2";
Netta P426cbef2017-02-10 14:38:39 -080018package android.service.pm;
19
Yi Jind6759d42017-10-12 15:08:49 -070020import "frameworks/base/core/proto/android/content/featureinfo.proto";
Yi Jin0d7bc2d12018-01-23 17:35:19 -080021import "frameworks/base/libs/incident/proto/android/privacy.proto";
Yi Jind6759d42017-10-12 15:08:49 -070022
Netta P426cbef2017-02-10 14:38:39 -080023option java_multiple_files = true;
24option java_outer_classname = "PackageServiceProto";
25
26message PackageServiceDumpProto {
Yi Jin0d7bc2d12018-01-23 17:35:19 -080027 option (android.msg_privacy).dest = DEST_AUTOMATIC;
28
Netta P426cbef2017-02-10 14:38:39 -080029 message PackageShortProto {
Yi Jin0d7bc2d12018-01-23 17:35:19 -080030 option (android.msg_privacy).dest = DEST_AUTOMATIC;
31
Netta P426cbef2017-02-10 14:38:39 -080032 // Name of package. e.g. "com.android.providers.telephony".
Yi Jinc7f93072017-09-29 15:29:38 -070033 optional string name = 1;
Netta P426cbef2017-02-10 14:38:39 -080034 // UID for this package as assigned by Android OS.
Yi Jinc7f93072017-09-29 15:29:38 -070035 optional int32 uid = 2;
Netta P426cbef2017-02-10 14:38:39 -080036 }
37 message SharedLibraryProto {
Yi Jin0d7bc2d12018-01-23 17:35:19 -080038 option (android.msg_privacy).dest = DEST_AUTOMATIC;
39
Yi Jinc7f93072017-09-29 15:29:38 -070040 optional string name = 1;
Netta P426cbef2017-02-10 14:38:39 -080041 // True if library path is not null (jar), false otherwise (apk)
Yi Jinc7f93072017-09-29 15:29:38 -070042 optional bool is_jar = 2;
Netta P426cbef2017-02-10 14:38:39 -080043 // Should be filled if is_jar is true
Yi Jinc7f93072017-09-29 15:29:38 -070044 optional string path = 3;
Netta P426cbef2017-02-10 14:38:39 -080045 // Should be filled if is_jar is false
Yi Jinc7f93072017-09-29 15:29:38 -070046 optional string apk = 4;
Netta P426cbef2017-02-10 14:38:39 -080047 }
Netta P426cbef2017-02-10 14:38:39 -080048 message SharedUserProto {
Yi Jin0d7bc2d12018-01-23 17:35:19 -080049 option (android.msg_privacy).dest = DEST_AUTOMATIC;
50
Yi Jinc7f93072017-09-29 15:29:38 -070051 optional int32 user_id = 1;
Kweku Adams30c1ce22018-02-07 14:31:00 -080052 // Name of the shared UID. eg: android.uid.bluetooth
53 optional string name = 2;
Netta P426cbef2017-02-10 14:38:39 -080054 }
55
56 // Installed packages.
Yi Jinc7f93072017-09-29 15:29:38 -070057 optional PackageShortProto required_verifier_package = 1;
58 optional PackageShortProto verifier_package = 2;
Netta P426cbef2017-02-10 14:38:39 -080059 repeated SharedLibraryProto shared_libraries = 3;
Yi Jind6759d42017-10-12 15:08:49 -070060 repeated android.content.pm.FeatureInfoProto features = 4;
Netta P426cbef2017-02-10 14:38:39 -080061 repeated PackageProto packages = 5;
62 repeated SharedUserProto shared_users = 6;
63 // Messages from the settings problem file
Yi Jin0d7bc2d12018-01-23 17:35:19 -080064 repeated string messages = 7 [ (android.privacy).dest = DEST_EXPLICIT ];
Netta P426cbef2017-02-10 14:38:39 -080065}
66
67message PackageProto {
Yi Jin0d7bc2d12018-01-23 17:35:19 -080068 option (android.msg_privacy).dest = DEST_AUTOMATIC;
69
Netta P426cbef2017-02-10 14:38:39 -080070 message SplitProto {
Yi Jin0d7bc2d12018-01-23 17:35:19 -080071 option (android.msg_privacy).dest = DEST_AUTOMATIC;
72
73 // The split name of package, e.g. base
Yi Jinc7f93072017-09-29 15:29:38 -070074 optional string name = 1;
75 optional int32 revision_code = 2;
Netta P426cbef2017-02-10 14:38:39 -080076 }
77 message UserInfoProto {
Yi Jin0d7bc2d12018-01-23 17:35:19 -080078 option (android.msg_privacy).dest = DEST_AUTOMATIC;
79
Netta P426cbef2017-02-10 14:38:39 -080080 enum InstallType {
81 NOT_INSTALLED_FOR_USER = 0;
82 FULL_APP_INSTALL = 1;
83 INSTANT_APP_INSTALL = 2;
84 }
85 // Enum values gotten from PackageManger.java
86 enum EnabledState {
87 // This component or application is in its default enabled state
88 // (as specified in its manifest).
89 COMPONENT_ENABLED_STATE_DEFAULT = 0;
90 // This component or application has been explictily enabled, regardless
91 // of what it has specified in its manifest.
92 COMPONENT_ENABLED_STATE_ENABLED = 1;
93 // This component or application has been explicitly disabled, regardless of
94 // what it has specified in its manifest.
95 COMPONENT_ENABLED_STATE_DISABLED = 2;
96 // The user has explicitly disabled the application, regardless of what it has
97 // specified in its manifest.
98 COMPONENT_ENABLED_STATE_DISABLED_USER = 3;
99 // This application should be considered, until the point where the user actually
100 // wants to use it.
101 COMPONENT_ENABLED_STATE_DISABLED_UNTIL_USED = 4;
102 }
103
Yi Jinc7f93072017-09-29 15:29:38 -0700104 optional int32 id = 1;
105 optional InstallType install_type = 2;
Netta P426cbef2017-02-10 14:38:39 -0800106 // Is the app restricted by owner / admin
Yi Jinc7f93072017-09-29 15:29:38 -0700107 optional bool is_hidden = 3;
108 optional bool is_suspended = 4;
109 optional bool is_stopped = 5;
110 optional bool is_launched = 6;
111 optional EnabledState enabled_state = 7;
112 optional string last_disabled_app_caller = 8;
Netta P426cbef2017-02-10 14:38:39 -0800113 }
114
115 // Name of package. e.g. "com.android.providers.telephony".
Yi Jinc7f93072017-09-29 15:29:38 -0700116 optional string name = 1;
Netta P426cbef2017-02-10 14:38:39 -0800117 // UID for this package as assigned by Android OS.
Yi Jinc7f93072017-09-29 15:29:38 -0700118 optional int32 uid = 2;
Netta P426cbef2017-02-10 14:38:39 -0800119 // Package's reported version.
Yi Jinc7f93072017-09-29 15:29:38 -0700120 optional int32 version_code = 3;
Netta P426cbef2017-02-10 14:38:39 -0800121 // Package's reported version string (what's displayed to the user).
Yi Jinc7f93072017-09-29 15:29:38 -0700122 optional string version_string = 4;
Netta P426cbef2017-02-10 14:38:39 -0800123 // UTC timestamp of install
Yi Jinc7f93072017-09-29 15:29:38 -0700124 optional int64 install_time_ms = 5;
Netta P426cbef2017-02-10 14:38:39 -0800125 // Millisecond UTC timestamp of latest update adjusted to Google's server clock.
Yi Jinc7f93072017-09-29 15:29:38 -0700126 optional int64 update_time_ms = 6;
Netta P426cbef2017-02-10 14:38:39 -0800127 // From "dumpsys package" - name of package which installed this one.
128 // Typically "" if system app or "com.android.vending" if Play Store.
Yi Jinc7f93072017-09-29 15:29:38 -0700129 optional string installer_name = 7;
Netta P426cbef2017-02-10 14:38:39 -0800130 // Split APKs.
131 repeated SplitProto splits = 8;
132 // Per-user package info.
133 repeated UserInfoProto users = 9;
134}